Skip to content

HasUnionWithCompatibility

Pipeline that can be used as the second argument in a $unionWith stage.

Instances of this interface should be immutable.

Inheritors

Properties

context

The context used to generate this pipeline.

Functions

embedInUnionWith

Writes this pipeline into a $unionWith stage.

This method is a low-level API for building custom $unionWith stages. Regular users should use HasUnionWith.unionWith instead.

Implementation contract

When another pipeline wants to embed the current pipeline into itself, it will call this method from within the $unionWith stage. This method should thus emit the body of the stage:

{
    coll: "<collection>",
    pipeline: [ <stage1>, ]
}

External resources

See also

reinterpret

Changes the type of the returned document, with no type-safety.

toString

abstract override fun toString(): String

JSON representation of this pipeline.

withStage

Creates a new pipeline that expands on the current one by adding stage.

writeTo

@LowLevelApi
abstract fun writeTo(writer: BsonValueWriter)

Writes the entire pipeline into writer.