Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.aggregationAbstractValue

AbstractValue

abstract class AbstractValue<Root : Any, Type> : Node, Value<Root, Type> 

Utility implementation of Value, which handles the context, toString representation and freezing.

Implementing a new operator

Implementing class is identical in concept to implementing AbstractBsonNode. The main difference is the writer is a BsonValueWriter instead of a BsonFieldWriter.

Constructors

AbstractValue

constructor(context: )

Properties

context

open override val context: 

The context used to generate this value.

Functions

freeze

open override fun freeze()

Makes this node immutable.

simplify

open override fun simplify(): AbstractValue<Root, Type>

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

toString

override fun toString(): String

JSON representation of this expression.

fun toString(simplified: Boolean): String

JSON representation of this expression.

writeTo

override fun writeTo(writer: )

Writes the result of simplifying this value into writer.