fun <T> MongoCollection<T>.countDocuments(): Single<Long>
(source)
Counts the number of documents
Return
count of all collection
fun <T> MongoCollection<T>.countDocuments(clientSession: ClientSession): Single<Long>
(source)
Counts the number of documents
clientSession
- the client session
Return
count of all collection
fun <T> MongoCollection<T>.countDocuments(filter: String, options: CountOptions = CountOptions()): Single<Long>
(source)
Counts the number of documents in the collection according to the given options.
Return
count of filtered collection
fun <T> MongoCollection<T>.countDocuments(clientSession: ClientSession, filter: String, options: CountOptions = CountOptions()): Single<Long>
(source)
Counts the number of documents in the collection according to the given options.
clientSession
- the client session
Return
count of filtered collection