Methods
-
addToOperationsList(bulkOperation, docType, document){UnorderedBulkOperation}
-
Add to internal list of Operations
Name Type Description bulkOperationUnorderedBulkOperation docTypenumber number indicating the document type
documentobject -
addToOperationsList(bulkOperation, docType, document){OrderedBulkOperation}
-
Add to internal list of Operations
Name Type Description bulkOperationOrderedBulkOperation docTypenumber number indicating the document type
documentobject -
executeBatch(bulkOperation, batch, options, callback)
-
Execute the command
Name Type Description bulkOperationUnorderedBulkOperation batchobject optionsobject callbackfunction -
executeBatches(bulkOperation, options, callback)
-
Execute all the commands
Name Type Description bulkOperationUnorderedBulkOperation optionsobject callbackfunction -
executeCommands(bulkOperation, options, callback)
-
Execute next write command in a chain
Name Type Description bulkOperationOrderedBulkOperation optionsobject callbackfunction -
handleMongoWriteConcernError(batch, bulkResult, ordered, err, callback)
-
handles write concern error
Name Type Description batchobject bulkResultobject orderedboolean errWriteConcernError callbackfunction -
isRetryableError(error)
-
Determines whether an error is something the driver should attempt to retry
Name Type Description errorMongoError | Error
Type Definitions
-
ReadConcernObject
-
The MongoDB ReadConcern, which allows for control of the consistency and isolation properties
of the data read from replica sets and replica set shards.- See:
Properties:
Name Type Description level'local' | 'available' | 'majority' | 'linearizable' | 'snapshot' The readConcern Level
-
SessionIdObject
-
A BSON document reflecting the lsid of a
ClientSession -
SessionOptionsObject
-
Options to pass when creating a Client Session
Properties:
Name Type Argument Default Description causalConsistencyboolean <optional>
true Whether causal consistency should be enabled on this session
defaultTransactionOptionsTransactionOptions <optional>
The default TransactionOptions to use for transactions started on this session.
-
TransactionOptionsObject
-
Configuration options for a transaction.
Properties:
Name Type Argument Description readConcernReadConcern <optional>
A default read concern for commands in this transaction
writeConcernWriteConcern <optional>
A default writeConcern for commands in this transaction
readPreferenceReadPreference <optional>
A default read preference for commands in this transaction
-
WriteConcernObject
-
A MongoDB WriteConcern, which describes the level of acknowledgement
requested from MongoDB for write operations.- See:
Properties:
Name Type Argument Default Description wnumber | 'majority' | string <optional>
1 requests acknowledgement that the write operation has
propagated to a specified number of mongod hostsjboolean <optional>
false requests acknowledgement from MongoDB that the write operation has
been written to the journalwtimeoutnumber <optional>
a time limit, in milliseconds, for the write concern