PushSortDsl¶
interface PushSortDsl<V : Any> : SortOptionDsl<V>
DSL for sorting elements during a $push operation.
See push and PushBuilder.sort.
Properties¶
context¶
@LowLevelApi
abstract val context: BsonContext
The context used to generate this expression.
field¶
Converts a Kotlin property into a Field.
Functions¶
accept¶
@LowLevelApi
@DangerousMongoApi
abstract override fun accept(node: BsonNode)
Adds a new node as a child of this one.
acceptAll¶
@LowLevelApi
@DangerousMongoApi
fun <N : Node> CompoundNode<N>.acceptAll(nodes: Iterable<N>)
Adds any number of nodes into this one.
ascending¶
open fun ascending(field: KProperty1<V, *>)
If two documents have a different value of field, the one with lesser value will be returned first.
If two documents have a different value of field, the one with lesser value will be returned first.
abstract fun ascending()
Sort array elements in ascending order (for simple values, not documents).
descending¶
open fun descending(field: KProperty1<V, *>)
If two documents have a different value of field, the one with greater value will be returned first.
abstract fun descending(field: Field<V, *>)
If two documents have a different value of field, the one with greater value will be returned first.
abstract fun descending()
Sort array elements in descending order (for simple values, not documents).
div¶
Refers to child as a nested field of the current field.
Refers to child as a nested field of the current field.
Refers to child as a nested field of the current field.
freeze¶
@LowLevelApi
abstract override fun freeze()
Makes this expression immutable.
get¶
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
simplify¶
@LowLevelApi
abstract fun simplify(): BsonNode?
Returns a simplified (but equivalent) expression to the current expression.
toBson¶
@LowLevelApi
open fun toBson(): BsonDocument
Writes the result of simplifying to a new BsonDocument.
toString¶
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.
Refers to a field child of the current field, with no compile-time safety.
writeTo¶
@LowLevelApi
abstract override fun writeTo(writer: BsonFieldWriter)
Writes the result of simplifying this expression into writer.