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

Method deleteOne

src/collection.ts:462–470  ·  view source on GitHub ↗

* Delete a document from a collection * * @param filter - The filter used to select the document to remove * @param options - Optional settings for the command

(
    filter: Filter<TSchema> = {},
    options: DeleteOptions = {}
  )

Source from the content-addressed store, hash-verified

460 * @param options - Optional settings for the command
461 */
462 async deleteOne(
463 filter: Filter<TSchema> = {},
464 options: DeleteOptions = {}
465 ): Promise<DeleteResult> {
466 return await executeOperation(
467 this.client,
468 new DeleteOneOperation(this.s.namespace, filter, resolveOptions(this, options))
469 );
470 }
471
472 /**
473 * Delete multiple documents from a collection

Callers 15

operations.tsFile · 0.45
collection.test.tsFile · 0.45
crud_api.test.tsFile · 0.45
bulk.test.tsFile · 0.45
testFunction · 0.45
explain.test.tsFile · 0.45

Calls 2

executeOperationFunction · 0.90
resolveOptionsFunction · 0.90

Tested by 1

testFunction · 0.36