* 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
)
| 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 |
no test coverage detected