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

Method findOneAndDelete

src/collection.ts:946–958  ·  view source on GitHub ↗
(
    filter: Filter<TSchema>,
    options?: FindOneAndDeleteOptions
  )

Source from the content-addressed store, hash-verified

944 ): Promise<WithId<TSchema> | null>;
945 async findOneAndDelete(filter: Filter<TSchema>): Promise<WithId<TSchema> | null>;
946 async findOneAndDelete(
947 filter: Filter<TSchema>,
948 options?: FindOneAndDeleteOptions
949 ): Promise<WithId<TSchema> | ModifyResult<TSchema> | null> {
950 return await executeOperation(
951 this.client,
952 new FindOneAndDeleteOperation(
953 this as TODO_NODE_3286,
954 filter,
955 resolveOptions(this, options)
956 ) as TODO_NODE_3286
957 );
958 }
959
960 /**
961 * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation.

Callers 11

operations.tsFile · 0.80
crud_api.test.tsFile · 0.80
explain.test.tsFile · 0.80
sort.test-d.tsFile · 0.80
findX.test-d.tsFile · 0.80

Calls 2

executeOperationFunction · 0.90
resolveOptionsFunction · 0.90

Tested by

no test coverage detected