fun <T> MongoCollection<T>.deleteOne(filter: String): Maybe<DeleteResult>
(source)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
filter
- the query filter to apply the the delete operation
Return
the result of the remove one operation
fun <T> MongoCollection<T>.deleteOne(clientSession: ClientSession, filter: String): Maybe<DeleteResult>
(source)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
clientSession
- the client session
filter
- the query filter to apply the the delete operation
Return
the result of the remove one operation
fun <T> MongoCollection<T>.deleteOne(vararg filters: Bson?): Maybe<DeleteResult>
(source)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
filters
- the query filter to apply the the delete operation
com.mongodb.MongoWriteException
-
com.mongodb.MongoWriteConcernException
-
Return
the result of the remove one operation
fun <T> MongoCollection<T>.deleteOne(clientSession: ClientSession, vararg filters: Bson?): Maybe<DeleteResult>
(source)
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
clientSession
- the client session
filters
- the query filter to apply the the delete operation
com.mongodb.MongoWriteException
-
com.mongodb.MongoWriteConcernException
-
Return
the result of the remove one operation