MCPcopy
hub / github.com/mongodb/node-mongodb-native / update

Method update

src/bulk/common.ts:692–701  ·  view source on GitHub ↗

Add a multiple update operation to the bulk operation

(updateDocument: Document | Document[])

Source from the content-addressed store, hash-verified

690
691 /** Add a multiple update operation to the bulk operation */
692 update(updateDocument: Document | Document[]): BulkOperationBase {
693 const currentOp = buildCurrentOp(this.bulkOperation);
694 return this.bulkOperation.addToOperationsList(
695 BatchType.UPDATE,
696 makeUpdateStatement(currentOp.selector, updateDocument, {
697 ...currentOp,
698 multi: true
699 })
700 );
701 }
702
703 /** Add a single update operation to the bulk operation */
704 updateOne(updateDocument: Document | Document[]): BulkOperationBase {

Callers 1

passwordDigestFunction · 0.45

Calls 3

makeUpdateStatementFunction · 0.90
buildCurrentOpFunction · 0.85
addToOperationsListMethod · 0.45

Tested by

no test coverage detected