Class: BulkOperationBase

BulkOperationBase

Parent class to OrderedBulkOperation and UnorderedBulkOperation

new BulkOperationBase()

Create a new OrderedBulkOperation or UnorderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly)

Methods

bulkExecute(bulk, writeConcern, options, callback)

Execute next write command in a chain

Name Type Description
bulk class

either OrderedBulkOperation or UnorderdBulkOperation

writeConcern object
options object
callback function

finalOptionsHandler(config, callback)

Handles final options before executing command

Name Type Description
config object
Name Type Description
options object
batch number
resultHandler function
callback function

find(selector)

Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne

Name Type Description
selector object

The selector for the bulk operation.

Throws:

handleWriteError(callback, writeResult, self)

Handles the write error before executing commands

Name Type Description
callback function
writeResult BulkWriteResult
self class

either OrderedBulkOperation or UnorderdBulkOperation

Add a single insert document to the bulk operation

Name Type Description
document object

the document to insert

Throws:

Raw performs the bulk operation

Name Type Description
op object

operation