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

Method constructor

src/operations/update.ts:167–178  ·  src/operations/update.ts::UpdateManyOperation.constructor
(
    ns: MongoDBCollectionNamespace,
    filter: Document,
    update: Document,
    options: UpdateOptions
  )

Source from the content-addressed store, hash-verified

165/** @internal */
166export class UpdateManyOperation extends UpdateOperation {
167 constructor(
168 ns: MongoDBCollectionNamespace,
169 filter: Document,
170 update: Document,
171 options: UpdateOptions
172 ) {
173 super(ns, [makeUpdateStatement(filter, update, { ...options, multi: true })], options);
174
175 if (!hasAtomicOperators(update, options)) {
176 throw new MongoInvalidArgumentError(class="st">'Update document requires atomic operators');
177 }
178 }
179
180 override handleOk(
181 response: InstanceType<typeof this.SERVER_COMMAND_RESPONSE_TYPE>

Callers

nothing calls this directly

Calls 2

hasAtomicOperatorsFunction · 0.90
makeUpdateStatementFunction · 0.85

Tested by

no test coverage detected