ConditionalValueOperators

Operators to conditionally create a value.

To learn more about aggregation operators, view AggregationOperators.

Inheritors

Properties

Link copied to clipboard
abstract val context: <Error class: unknown class>
Link copied to clipboard

Converts a Kotlin property into a Field.

Functions

Link copied to clipboard
open fun <R : Any, T> cond(condition: Value<R, Boolean>, ifTrue: Value<R, T>, ifFalse: Value<R, T>): Value<R, T>

Decides between two values depending on the evaluation of a boolean value.

Link copied to clipboard
open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: KProperty1<Root, Child>): Value<Context, Child>
open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: Field<Root, Child>): Value<Context, Child>

Refers to field as a nested field of the current value.

open operator fun <Root, Parent, Child> KProperty1<Root, Parent>.div(child: KProperty1<Parent & Any, Child>): Field<Root, Child>

Refers to child as a nested field of the current field.

Link copied to clipboard
open operator fun <Root, Type> KProperty1<Root, Collection<Type>>.get(index: Int): Field<Root, Type>

Refers to a specific item in an array, by its index.

open operator fun <Root, Type> KProperty1<Root, Map<String, Type>>.get(index: String): Field<Root, Type>

Refers to a specific item in a map, by its name.

Link copied to clipboard
open fun <Result> of(value: Result): Value<Any, Result>

Refers to a Kotlin value within an aggregation value.

open fun of(value: <Error class: unknown class>): Value<Any, <Error class: unknown class>>

Refers to a BsonType within an aggregation value.

open fun <Context : Any, Result> of(field: Field<Context, Result>): Value<Context, Result>

Refers to a field within an aggregation value.

Link copied to clipboard
open fun <R : Any, T> switch(vararg cases: <Error class: unknown class><Value<R, Boolean>, Value<R, T>>, default: Value<R, T>? = null): Value<R, T>

Selects one value based on multiple conditions.