Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.query

Package-level declarations

Operators, classified by the context in which they are available in.

Classes of this package are not expected to be instantiated by the user. Instead, it is expected by the driver will provide an instance of these classes in its own DSL, such that the user doesn't have to think about which class they should use.

However, the user should still be aware of these classes, as they are the place where operators are documented.

Types

FilterQuery

DSL for MongoDB operators that are used as predicates in conditions.

FilterQueryPredicate

DSL for MongoDB operators that are used as predicates in conditions in a context where the targeted field is already specified.

UpdateQuery

DSL for MongoDB operators that are used to update existing values (does not include aggregation operators).

UpdateWithPipelineQuery

Interface describing the DSL when declaring an update with a pipeline.

UpsertQuery

interface UpsertQuery<T> : UpdateQuery<T> 

DSL for MongoDB operators that are used to update existing values, creating new documents if none exist (does not include aggregation operators).

Functions

FilterQuery

fun <T> FilterQuery(context: ): FilterQuery<T>

Creates an empty FilterQuery.

FilterQueryPredicate

Creates an empty FilterQueryPredicate.

UpdateQuery

fun <T> UpdateQuery(context: ): UpdateQuery<T>

Creates an empty UpdateQuery.

UpdateWithPipelineQuery

Creates an empty UpdateWithPipelineQuery.

UpsertQuery

fun <T> UpsertQuery(context: ): UpsertQuery<T>

Creates an empty UpsertQuery.