findOneAndDelete

abstract suspend fun findOneAndDelete(filter: Bson): TDocument?

Atomically find a document and remove it.

Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.

Parameters

filter

the query filter to find the document with returned


abstract suspend fun findOneAndDelete(filter: Bson, options: FindOneAndDeleteOptions): TDocument?

Atomically find a document and remove it.

Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.

Parameters

filter

the query filter to find the document with

options

the options to apply to the operation returned


abstract suspend fun findOneAndDelete(clientSession: ClientSession, filter: Bson): TDocument?

Atomically find a document and remove it.

Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.

Since

3.6

Parameters

clientSession

the client session with which to associate this operation

filter

the query filter to find the document with returned


abstract suspend fun findOneAndDelete(    clientSession: ClientSession,     filter: Bson,     options: FindOneAndDeleteOptions): TDocument?

Atomically find a document and remove it.

Note: Supports retryable writes on MongoDB server versions 3.6 or higher when the retryWrites setting is enabled.

Since

3.6

Parameters

clientSession

the client session with which to associate this operation

filter

the query filter to find the document with

options

the options to apply to the operation returned