ProjectStageOperators

Properties

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

The context used to generate this expression.

Link copied to clipboard

Converts a Kotlin property into a Field.

Link copied to clipboard
open val <R : Any> Value<R, *>.isArray: Value<R, Boolean>

Determines if this value is an array.

Link copied to clipboard
open val <R : Any> Value<R, *>.isNumber: Value<R, Boolean>

Determines if this value is a number.

Link copied to clipboard
open val <R : Any> Value<R, *>.type: Value<R, <Error class: unknown class>>

Gets the BsonType of the current value.

Functions

Link copied to clipboard

The absolute value of a number.

Link copied to clipboard
abstract override fun accept(node: BsonNode)

Adds a new node as a child of this one.

Link copied to clipboard
fun <N : Node> CompoundNode<N>.acceptAll(nodes: Iterable<N>)

Adds any number of nodes into this one.

Link copied to clipboard
open fun <Context : Any> acos(value: Value<Context, Double?>): Value<Context, Double?>

The inverse cosine (arc cosine) of a value, in radians.

Link copied to clipboard
open fun <Context : Any> acosh(value: Value<Context, Double?>): Value<Context, Double?>

The inverse hyperbolic cosine (hyperbolic arc cosine) of a value, in radians.

Link copied to clipboard
open fun <Context : Any> asin(value: Value<Context, Double?>): Value<Context, Double?>

The inverse sine (arc sine) of a value, in radians.

Link copied to clipboard
open fun <Context : Any> asinh(value: Value<Context, Double?>): Value<Context, Double?>

The inverse hyperbolic sine (hyperbolic arc sine) of a value, in radians.

Link copied to clipboard
open fun <Context : Any> atan(value: Value<Context, Double?>): Value<Context, Double?>

The inverse tangent (arc tangent) of a value, in radians.

Link copied to clipboard
open fun <Context : Any> atanh(value: Value<Context, Double?>): Value<Context, Double?>

The inverse hyperbolic tangent (hyperbolic arc tangent) of a value, in radians.

Link copied to clipboard

The smallest integer greater than or equal to the specified value.

Link copied to clipboard

Concatenates two strings together.

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 fun <Context : Any> cos(value: Value<Context, Double?>): Value<Context, Double?>

The cosine of a value that is measured in radians.

Link copied to clipboard
open fun <Context : Any> cosh(value: Value<Context, Double?>): Value<Context, Double?>

The hyperbolic cosine of a value that is measured in radians.

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

Compares two aggregation values and returns true if they are equivalent.

Link copied to clipboard
abstract fun excludeId()

Excludes the _id field.

Link copied to clipboard
open fun <Context : Any, T> Collection<T>.filter(limit: Value<Context, Number>? = null, variableName: String = "this", predicate: AggregationOperators.(Value<Any, T>) -> Value<T & Any, Boolean>): Value<Context, List<T>>
open fun <Context : Any, T> KProperty1<Context, Collection<T>>.filter(limit: Value<Context, Number>? = null, variableName: String = "this", predicate: AggregationOperators.(Value<Any, T>) -> Value<T & Any, Boolean>): Value<Context, List<T>>
open fun <Context : Any, T> Value<Context, Collection<T>>.filter(limit: Value<Context, Number>? = null, variableName: String = "this", predicate: AggregationOperators.(Value<Any, T>) -> Value<T & Any, Boolean>): Value<Context, List<T>>
open fun <Context : Any, T> Field<Context, Collection<T>>.filter(limit: Value<Context, Number>? = null, variableName: String = "this", predicate: AggregationOperators.(Value<Any, T>) -> Value<T & Any, Boolean>): Value<Context, List<T>>

Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.

Link copied to clipboard

The largest integer less than or equal to the specified value.

Link copied to clipboard
abstract override fun freeze()

Makes this expression immutable.

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
Link copied to clipboard
Link copied to clipboard
open fun include(field: KProperty1<Document, *>)
abstract fun include(field: Field<Document, *>)

Explicitly includes field.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <Context : Any, T, R> Collection<T>.map(variableName: String = "this", transform: AggregationOperators.(Value<Any, T>) -> Value<Context, R>): Value<Context, List<R>>
open fun <Context : Any, T, R> KProperty1<Context, Collection<T>>.map(variableName: String = "this", transform: AggregationOperators.(Value<Any, T>) -> Value<Context, R>): Value<Context, List<R>>
open fun <Context : Any, T, R> Value<Context, Collection<T>>.map(variableName: String = "this", transform: AggregationOperators.(Value<Any, T>) -> Value<Context, R>): Value<Context, List<R>>
open fun <Context : Any, T, R> Field<Context, Collection<T>>.map(variableName: String = "this", transform: AggregationOperators.(Value<Any, T>) -> Value<Context, R>): Value<Context, List<R>>

Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.

Link copied to clipboard

Compares two aggregation values and returns true if they are not equivalent.

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 operator fun <Context : Any, Result> Value<Context, Result>.plus(other: Value<Context, Result>): Value<Context, Result>

Sums two aggregation values.

Link copied to clipboard
open infix fun <V> KProperty1<Document, V>.set(value: V)
open infix fun <V> KProperty1<Document, V>.set(value: Value<Document, V>)
open infix fun <V> Field<Document, V>.set(value: V)
abstract infix fun <V> Field<Document, V>.set(value: Value<Document, V>)

Replaces the value of a field with the specified value.

Link copied to clipboard
open fun <V> KProperty1<Document, V>.setIf(condition: Boolean, value: V)
open fun <V> KProperty1<Document, V>.setIf(condition: Boolean, value: Value<Document, V>)
open fun <V> KProperty1<Document, V>.setIf(condition: Value<Document, Boolean>, value: V)
open fun <V> KProperty1<Document, V>.setIf(condition: Value<Document, Boolean>, value: Value<Document, V>)
open fun <V> Field<Document, V>.setIf(condition: Boolean, value: V)
open fun <V> Field<Document, V>.setIf(condition: Boolean, value: Value<Document, V>)
open fun <V> Field<Document, V>.setIf(condition: Value<Document, Boolean>, value: V)
open fun <V> Field<Document, V>.setIf(condition: Value<Document, Boolean>, value: Value<Document, V>)

Replaces the value of a field with the specified value, if condition is true.

Link copied to clipboard
open fun <V> KProperty1<Document, V>.setUnless(condition: Boolean, value: V)
open fun <V> KProperty1<Document, V>.setUnless(condition: Boolean, value: Value<Document, V>)
open fun <V> KProperty1<Document, V>.setUnless(condition: Value<Document, Boolean>, value: V)
open fun <V> KProperty1<Document, V>.setUnless(condition: Value<Document, Boolean>, value: Value<Document, V>)
open fun <V> Field<Document, V>.setUnless(condition: Boolean, value: V)
open fun <V> Field<Document, V>.setUnless(condition: Boolean, value: Value<Document, V>)
open fun <V> Field<Document, V>.setUnless(condition: Value<Document, Boolean>, value: V)
open fun <V> Field<Document, V>.setUnless(condition: Value<Document, Boolean>, value: Value<Document, V>)

Replaces the value of a field with the specified value, if condition is false.

Link copied to clipboard
abstract fun simplify(): BsonNode?

Returns a simplified (but equivalent) expression to the current expression.

Link copied to clipboard
open fun <Context : Any> sin(value: Value<Context, Double?>): Value<Context, Double?>

The sine of a value that is measured in radians.

Link copied to clipboard
open fun <Context : Any> sinh(value: Value<Context, Double?>): Value<Context, Double?>

The hyperbolic sine of a value that is measured in radians.

Link copied to clipboard
open fun <Context : Any, T> Collection<T>.sorted(): Value<Context, List<T>>

Sorts an array based on its elements, in ascending order.

Link copied to clipboard
open fun <Context : Any, T> Collection<T>.sortedBy(order: SortOptionDsl<T & Any>.() -> Unit): Value<Context, List<T>>

Sorts an array based on fields of its elements.

Link copied to clipboard

Sorts an array based on its elements, in descending order.

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.

Link copied to clipboard
open fun <Context : Any, T> Collection<T>.take(limit: Value<Context, Number>): Value<Context, List<T>>

Returns the first limit elements in an array, similar to kotlin.collections.take.

Link copied to clipboard

Returns the last limit elements in an array, similar to kotlin.collections.takeLast.

Link copied to clipboard
open fun <Context : Any> tan(value: Value<Context, Double?>): Value<Context, Double?>

The tangent of a value that is measured in radians.

Link copied to clipboard
open fun <Context : Any> tanh(value: Value<Context, Double?>): Value<Context, Double?>

The hyperbolic tangent of a value that is measured in radians.

Link copied to clipboard
open fun <R : Any> Value<R, *>.toBoolean(): Value<R, Boolean>

Converts this value to a BsonType.Boolean.

Link copied to clipboard
open fun toBson(): <Error class: unknown class>

Writes the result of simplifying to a new Bson.

Link copied to clipboard

Converts an angle in radians to an angle in degrees.

Link copied to clipboard
open fun <R : Any> Value<R, *>.toDouble(): Value<R, Double>

Converts this value to a BsonType.Double.

Link copied to clipboard
open fun <R : Any> Value<R, *>.toInstant(): Value<R, <Error class: unknown class>>

Converts this value to an Instant (BsonType.Datetime).

Link copied to clipboard
open fun <R : Any> Value<R, *>.toInt(): Value<R, Int>

Converts this value to an Int (BsonType.Int32).

Link copied to clipboard
open fun <R : Any> Value<R, *>.toLong(): Value<R, Long>

Converts this value to an Long (BsonType.Int64).

Link copied to clipboard
open fun <R : Any> Value<R, *>.toObjectId(): Value<R, <Error class: unknown class>>

Converts this value to an ObjectId.

Link copied to clipboard

Converts an angle in degrees to an angle in radians.

Link copied to clipboard
abstract override fun toString(): String

JSON representation of this expression.

Link copied to clipboard
open fun <R : Any> Value<R, *>.toText(): Value<R, String>

Converts this value to a String.

Link copied to clipboard
open fun <R : Any> Value<R, *>.toUuid(): Value<R, <Error class: unknown class>>

Converts a string value to a Uuid (BsonType.BinaryData).

Link copied to clipboard
abstract fun writeTo(writer: <Error class: unknown class>)

Writes the result of simplifying this expression into writer.