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

Method constructor

src/operations/insert.ts:70–72  ·  view source on GitHub ↗
(collection: Collection, doc: Document, options: InsertOneOptions)

Source from the content-addressed store, hash-verified

68
69export class InsertOneOperation extends InsertOperation {
70 constructor(collection: Collection, doc: Document, options: InsertOneOptions) {
71 super(collection.s.namespace, [maybeAddIdToDocuments(collection, doc, options)], options);
72 }
73
74 override handleOk(response: InstanceType<typeof this.SERVER_COMMAND_RESPONSE_TYPE>): Document {
75 const res = super.handleOk(response);

Callers

nothing calls this directly

Calls 1

maybeAddIdToDocumentsFunction · 0.90

Tested by

no test coverage detected