Driver

class db.Driver

const { Driver } = require('db.driver')

Driver(objectName)

Arguments

  • objectName { String } The object definition name.

Returns

  • { Driver } A driver instance.

aggregate(pipeline)

Arguments

  • pipeline { Object[] } An optional aggrgation pipeline.

Returns

count(where)

Arguments

  • where { Object } An optional where filter document.

Returns

  • { Number } A document count.

deleteMany(match)

Arguments

  • match { Object } A match filter document.

Returns

deleteOne(match)

Arguments

  • match { Object } A match filter document.

Returns

find(where)

Arguments

  • where { Object } An optional where filter document.

Returns

readOne(where)

Arguments

  • where { Object } A where filter document.

Returns

insertMany(docs)

Arguments

  • docs { Object[] } An array of documents to insert.

Returns

insertOne(doc)

Arguments

  • doc { Object } A document to insert.

Returns

updateOne(match, doc)

Arguments

  • match { Object } A match filter document.

  • doc { Object } A document to update.

Returns

updateMany(match, doc)

Arguments

  • match { Object } A match filter document.

  • doc { Object } A document to update.

Returns

patchOne(match, doc)

Arguments

  • match { Object } A match filter document.

  • doc { Object } A document to patch.

Returns

patchMany(match, doc)

Arguments

  • match { Object } A match filter document.

  • doc { Object } A document to patch.

Returns

Last updated