kmongo / org.litote.kmongo.rxjava2 / com.mongodb.reactivestreams.client.MongoCollection / deleteMany

deleteMany

fun <T> MongoCollection<T>.deleteMany(filter: String, options: DeleteOptions = DeleteOptions()): Maybe<DeleteResult> (source)

Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

Parameters

filter - the query filter to apply the the delete operation

options - the options to apply to the delete operation

fun <T> MongoCollection<T>.deleteMany(clientSession: ClientSession, filter: String, options: DeleteOptions = DeleteOptions()): Maybe<DeleteResult> (source)

Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

Parameters

clientSession - the client session

filter - the query filter to apply the the delete operation

options - the options to apply to the delete operation

fun <T> MongoCollection<T>.deleteMany(vararg filters: Bson?, options: DeleteOptions = DeleteOptions()): Maybe<DeleteResult> (source)

Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

Parameters

filters - the query filters to apply the the delete operation

options - the options to apply to the delete operation

fun <T> MongoCollection<T>.deleteMany(clientSession: ClientSession, vararg filters: Bson?, options: DeleteOptions = DeleteOptions()): Maybe<DeleteResult> (source)

Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

Parameters

clientSession - the client session

filters - the query filters to apply the the delete operation

options - the options to apply to the delete operation