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

Method updateMany

src/collection.ts:445–454  ·  view source on GitHub ↗

* Update multiple documents in a collection * * The value of `update` can be either: * - UpdateFilter<TSchema> - A document that contains update operator expressions, * - Document[] - an aggregation pipeline. * * @param filter - The filter used to select the document to update *

(
    filter: Filter<TSchema>,
    update: UpdateFilter<TSchema> | Document[],
    options?: UpdateOptions
  )

Source from the content-addressed store, hash-verified

443 * @param options - Optional settings for the command
444 */
445 async updateMany(
446 filter: Filter<TSchema>,
447 update: UpdateFilter<TSchema> | Document[],
448 options?: UpdateOptions
449 ): Promise<UpdateResult<TSchema>> {
450 return await executeOperation(
451 this.client,
452 new UpdateManyOperation(this.s.namespace, filter, update, resolveOptions(this, options))
453 );
454 }
455
456 /**
457 * Delete a document from a collection

Calls 2

executeOperationFunction · 0.90
resolveOptionsFunction · 0.90

Tested by

no test coverage detected