CountOperations

The different MongoDB operations related to counting documents.

Inheritors

Properties

Link copied to clipboard

The full BSON configuration, used by the DSL to generate queries.

Functions

Link copied to clipboard
abstract suspend fun count(): Long

Counts how many documents exist in the collection.

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

Counts how many documents match predicate in the collection.

Link copied to clipboard
abstract suspend fun countEstimated(): Long

Counts all documents in the collection.

Link copied to clipboard
open suspend fun exists(options: CountOptions<Document>.() -> Unit = {}, predicate: FilterQuery<Document>.() -> Unit): Boolean

Tests if there exists a document that matches predicate in the collection.