MongoDB request DSL • opensavvy.ktmongo.dsl.aggregation.operators • ArrayValueOperators
ArrayValueOperators¶
interface ArrayValueOperators : ValueOperators
Operators to manipulate arrays.
To learn more about aggregation operators, see opensavvy.ktmongo.dsl.aggregation.AggregationOperators.
Inheritors¶
Properties¶
context¶
abstract val context:
field¶
Converts a Kotlin property into a Field.
Functions¶
average¶
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
Returns the average of the elements in the array.
div¶
Refers to field as a nested field of the current value.
Refers to field as a nested field of the current value.
Refers to child as a nested field of the current field.
filter¶
Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.
Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.
Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.
Selects a subset of an array to return based on the specified predicate, similarly to kotlin.collections.filter.
get¶
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
map¶
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
Applies a transform to all elements in an array and returns the array with the applied results, similar to kotlin.collections.map.
of¶
Refers to a Kotlin value within an aggregation value.
Refers to a BsonType within an aggregation value.
Refers to a field within an aggregation value.
Refers to a field within an aggregation value.
sorted¶
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
Sorts an array based on its elements, in ascending order.
sortedBy¶
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
Sorts an array based on fields of its elements.
sortedDescending¶
open fun <Context : Any, T> Collection<T>.sortedDescending(): Value<Context, List<T>>
Sorts an array based on its elements, in descending order.
open fun <Context : Any, T> KProperty1<Context, Collection<T>>.sortedDescending(): Value<Context, List<T>>
Sorts an array based on its elements, in descending order.
Sorts an array based on its elements, in descending order.
Sorts an array based on its elements, in descending order.
take¶
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
Returns the first limit elements in an array, similar to kotlin.collections.take.
takeLast¶
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
Returns the last limit elements in an array, similar to kotlin.collections.takeLast.
unsafe¶
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>
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.
Refers to a field child of the current field, without checking that it is a field available on the current object.