Skip to content

MongoDB driver for Kotlin (coroutines)opensavvy.ktmongo.coroutines.operationsCountOperations

CountOperations

Interface grouping MongoDB operations relating to counting documents.

Inheritors

Properties

context

abstract val context: 

Functions

count

abstract suspend fun count(): Long

Counts how many documents exist in the collection.

abstract suspend fun count(options: <Document>.() -> Unit = {}, predicate: <Document>.() -> Unit): Long

Counts how many documents match predicate in the collection.

countEstimated

abstract suspend fun countEstimated(): Long

Counts all documents in the collection.