ArithmeticValueAccumulators

Accumulators to perform arithmetic operations.

To learn more about accumulation operators, see AccumulationOperators.

Inheritors

Properties

Link copied to clipboard
abstract override val context: BsonContext

The strategy used when converting from KProperty1 to Field.

Link copied to clipboard

Converts a Kotlin property into a Field.

Functions

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

Adds a new node as a child of this one.

Link copied to clipboard

Adds any number of nodes into this one.

Link copied to clipboard
infix inline fun <T : Number> KProperty1<Into, T>.average(value: Number?)
@JvmName(name = "averagePropertyReceiverByProperty")
open infix fun <T : Number> KProperty1<Into, T>.average(value: KProperty1<From, Number?>)
open infix fun <T : Number> KProperty1<Into, T>.average(value: Value<From, Number?>)
@JvmName(name = "averagePropertyReceiverByField")
open infix fun <T : Number> KProperty1<Into, T>.average(value: Field<From, Number?>)
infix inline fun <T : Number> Field<Into, T>.average(value: Number?)
@JvmName(name = "averageByProperty")
open infix fun <T : Number> Field<Into, T>.average(value: KProperty1<From, Number?>)
open infix fun <T : Number> Field<Into, T>.average(value: Value<From, Number?>)
@JvmName(name = "averageByField")
open infix fun <T : Number> Field<Into, T>.average(value: Field<From, Number?>)

Calculates and returns the collective average of numeric values. Non-numeric values are ignored.

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>
open operator fun <Root, Type, Child> Field<Root, Type>.div(child: KProperty1<in Type & Any, Child>): Field<Root, Child>
open operator fun <Root, Type, Child> Field<Root, Type>.div(child: Field<Type, Child>): Field<Root, Child>

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

Link copied to clipboard
abstract override fun freeze()

Makes this node immutable.

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

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

@JvmName(name = "bsonItem")
operator fun <Context : Any, Child> Value<Context, BsonArray>.get(index: Int): Value<Context, Child>
@JvmName(name = "bsonField")
operator fun <Context : Any, Child> Value<Context, BsonDocument>.get(field: String): Value<Context, Child>
@JvmName(name = "bsonField")
operator fun <Root, Child> KProperty1<Root, BsonDocument>.get(field: String): Field<Root, Child>
@JvmName(name = "bsonField")
operator fun <Root, Child> Field<Root, BsonDocument>.get(field: String): Field<Root, Child>

Refers to a child field of a field of type BsonDocument.

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

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

@JvmName(name = "bsonItem")
operator fun <Root, Child> KProperty1<Root, BsonArray>.get(index: Int): Field<Root, Child>
@JvmName(name = "bsonItem")
operator fun <Root, Child> Field<Root, BsonArray>.get(index: Int): Field<Root, Child>

Refers to a child item of a field of type BsonArray.

@JvmName(name = "bsonField")
operator fun <Child> BsonDocument.Companion.get(field: String): Field<BsonDocument, Child>

Refers to a root field of the document being analyzed.

Link copied to clipboard
infix inline fun <T : Number> KProperty1<Into, T>.median(value: Number?)
@JvmName(name = "medianPropertyReceiverByProperty")
open infix fun <T : Number> KProperty1<Into, T>.median(value: KProperty1<From, Number?>)
open infix fun <T : Number> KProperty1<Into, T>.median(value: Value<From, Number?>)
@JvmName(name = "medianPropertyReceiverByField")
open infix fun <T : Number> KProperty1<Into, T>.median(value: Field<From, Number?>)
infix inline fun <T : Number> Field<Into, T>.median(value: Number?)
@JvmName(name = "medianByProperty")
open infix fun <T : Number> Field<Into, T>.median(value: KProperty1<From, Number?>)
open infix fun <T : Number> Field<Into, T>.median(value: Value<From, Number?>)
@JvmName(name = "medianByField")
open infix fun <T : Number> Field<Into, T>.median(value: Field<From, Number?>)

Returns an approximation of the median, the 50th percentile, as a scalar value.

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

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

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

Refers to a BsonType within an aggregation value.

Link copied to clipboard
inline fun <T : Number> KProperty1<Into, List<T>>.percentiles(value: Number?, vararg percentiles: Double)
@JvmName(name = "percentilesPropertyReceiverByProperty")
open fun <T : Number> KProperty1<Into, List<T>>.percentiles(value: KProperty1<From, Number?>, vararg percentiles: Double)
open fun <T : Number> KProperty1<Into, List<T>>.percentiles(value: Value<From, Number?>, vararg percentiles: Double)
@JvmName(name = "percentilesPropertyReceiverByField")
open fun <T : Number> KProperty1<Into, List<T>>.percentiles(value: Field<From, Number?>, vararg percentiles: Double)
inline fun <T : Number> Field<Into, List<T>>.percentiles(value: Number?, vararg percentiles: Double)
@JvmName(name = "percentilesByProperty")
open fun <T : Number> Field<Into, List<T>>.percentiles(value: KProperty1<From, Number?>, vararg percentiles: Double)
open fun <T : Number> Field<Into, List<T>>.percentiles(value: Value<From, Number?>, vararg percentiles: Double)
@JvmName(name = "percentilesByField")
open fun <T : Number> Field<Into, List<T>>.percentiles(value: Field<From, Number?>, vararg percentiles: Double)

Returns an approximation of the specified percentiles.

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

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

Link copied to clipboard
infix inline fun <T : Number> KProperty1<Into, T>.sum(value: Number?)
@JvmName(name = "sumPropertyReceiverByProperty")
open infix fun <T : Number> KProperty1<Into, T>.sum(value: KProperty1<From, Number?>)
open infix fun <T : Number> KProperty1<Into, T>.sum(value: Value<From, Number?>)
@JvmName(name = "sumPropertyReceiverByField")
open infix fun <T : Number> KProperty1<Into, T>.sum(value: Field<From, Number?>)
infix inline fun <T : Number> Field<Into, T>.sum(value: Number?)
@JvmName(name = "sumByProperty")
open infix fun <T : Number> Field<Into, T>.sum(value: KProperty1<From, Number?>)
open infix fun <T : Number> Field<Into, T>.sum(value: Value<From, Number?>)
@JvmName(name = "sumByField")
open infix fun <T : Number> Field<Into, T>.sum(value: Field<From, Number?>)

Calculates and returns the collective sum of numeric values. Non-numeric values are ignored.

Link copied to clipboard

Writes the result of simplifying to a new BsonDocument.

Link copied to clipboard
open infix fun <Root, Child> KProperty1<Root, *>.unsafe(child: String): Field<Root, Child>
open infix fun <Root, Type, Child> Field<Root, Type>.unsafe(child: String): Field<Root, Child>

Refers to a field child of the current field, with no compile-time safety.

open infix fun <Root, Child> KProperty1<Root, *>.unsafe(child: KProperty1<*, Child>): Field<Root, Child>
open infix fun <Root, Child> KProperty1<Root, *>.unsafe(child: Field<*, Child>): Field<Root, Child>
open infix fun <Root, Child> Field<Root, *>.unsafe(child: KProperty1<*, Child>): Field<Root, Child>
open infix fun <Root, Child> Field<Root, *>.unsafe(child: Field<*, Child>): Field<Root, Child>

Refers to a field child of the current field, without checking that it is a field available on the current object.

Link copied to clipboard

Overwrites the represented type of this value.

Overwrites the represented type of this field.

Link copied to clipboard
abstract override fun writeTo(writer: BsonFieldWriter)

Writes the result of simplifying this expression into writer.