Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.aggregation.operatorsArithmeticValueOperators

ArithmeticValueOperators

Operators to arithmetically combine two or more values.

To learn more about aggregation operators, see AggregationOperators.

Inheritors

Properties

context

abstract val context: 

field

Converts a Kotlin property into a Field.

Functions

abs

open fun <Context : Any, Result : Number?> abs(value: Value<Context, Result>): Value<Context, Result>

The absolute value of a number.

ceil

open fun <Context : Any, Result : Number?> ceil(value: Value<Context, Result>): Value<Context, Result>

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

concat

open infix fun <Context : Any> Value<Context, String>.concat(other: Value<Context, String>): Value<Context, String>

Concatenates two strings together.

div

open operator fun <Context : Any, Result> Value<Context, Result>.div(other: Value<Context, Result>): Value<Context, Result>

Divides one aggregation value by another.

open operator fun <Context : Any, Root, Child> Value<Context, Root>.div(field: KProperty1<Root, Child>): Value<Context, Child>

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

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.

floor

open fun <Context : Any, Result : Number?> floor(value: Value<Context, Result>): Value<Context, Result>

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

get

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.

minus

open operator fun <Context : Any, Result> Value<Context, Result>.minus(other: Value<Context, Result>): Value<Context, Result>

Subtracts one aggregation value from another.

of

open fun <Result> of(value: Result): Value<Any, Result>

Refers to a Kotlin value within an aggregation value.

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

Refers to a BsonType within an aggregation value.

Refers to a field 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.

plus

open operator fun <Context : Any, Result> Value<Context, Result>.plus(other: Value<Context, Result>): Value<Context, Result>

Sums two aggregation values.

times

open operator fun <Context : Any, Result> Value<Context, Result>.times(other: Value<Context, Result>): Value<Context, Result>

Multiplies two or more aggregation values.