Skip to content

MongoDB driver for Kotlin (synchronous)opensavvy.ktmongo.sync.operationsCountOperations

CountOperations

Interface grouping MongoDB operations relating to counting documents.

Inheritors

Properties

context

abstract val context: 

Functions

count

abstract fun count(): Long

Counts how many documents exist in the collection.

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

Counts how many documents match predicate in the collection.

countEstimated

abstract fun countEstimated(): Long

Counts all documents in the collection.