Class: FindOperators

FindOperators

A builder object that is returned from BulkOperationBase#find.
Is used to build a write operation that involves a query filter.

new FindOperators(bulkOperation)

Creates a new FindOperators object.

NOTE: Internal Type, do not instantiate directly

Name Type Description
bulkOperation OrderedBulkOperation | UnorderedBulkOperation

Methods

Add a delete many operation to the bulk operation

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
reference to the parent BulkOperation

Add a delete one operation to the bulk operation

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
reference to the parent BulkOperation

backwards compatability for delete

backwards compatability for deleteOne

Add a replace one operation to the bulk operation

Name Type Description
updateDocument object

the new document to replace the existing one with

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
reference to the parent BulkOperation

Add a multiple update operation to the bulk operation

Name Type Description
updateDocument object

An update field for an update operation. See u documentation

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
reference to the parent BulkOperation

Add a single update operation to the bulk operation

Name Type Description
updateDocument object

An update field for an update operation. See u documentation

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
reference to the parent BulkOperation

Upsert modifier for update bulk operation, noting that this operation is an upsert.

Throws:

If operation cannot be added to bulk write

Type
MongoError
Returns:
to self