Skip to main content
Very Popular
Latest
method Collection.prototype.updateMany
import { Collection } from "https://deno.land/x/mongo@v0.33.0/src/collection/mod.ts";

Update multiple documents matching the given filter

Parameters

filter: Filter<T>

The query used to match the documents

doc: UpdateFilter<T>

The update to apply to the documents

optional
options: UpdateOptions

Additional options for the operation

Returns

Promise<{ upsertedIds: ObjectId[] | undefined; upsertedCount: number; modifiedCount: number; matchedCount: number; }>

The number of documents matched, modified, and upserted