PushBuilder

DSL builder for advanced $push operations.

See push.

Properties

Link copied to clipboard

The context used to generate this expression.

Functions

Link copied to clipboard
abstract fun each(values: Iterable<V>)
open fun each(vararg values: V)

Specifies the values to push to the array.

Link copied to clipboard
abstract override fun freeze()

Makes this expression immutable.

Link copied to clipboard
abstract fun position(index: Int)

Specifies the location in the array at which the $push operator inserts elements.

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

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

Link copied to clipboard
abstract fun slice(count: Int)

Limits the number of array elements after the push operation.

Link copied to clipboard
abstract fun sort(block: UpdateQuery.PushSortDsl<V & Any>.() -> Unit)

Orders the elements of an array during a $push operation.

Link copied to clipboard

Writes the result of simplifying to a new BsonDocument.

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

JSON representation of this expression.

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

Writes the result of simplifying this expression into writer.