PipelineChainLink¶
@LowLevelApi
class PipelineChainLink
A single link in the Pipeline chain.
End-users should not interact with this class. This class is provided as an implementation detail of AbstractPipeline. If you are not implementing your own pipeline type, you do not need to interact with this class at all.
Constructors¶
PipelineChainLink¶
constructor(context: BsonContext)
Creates an empty PipelineChainLink, corresponding to an empty aggregation pipeline.
Functions¶
toBsonList¶
@LowLevelApi
fun toBsonList(): List<Bson>
Converts this chain in a list of BSON documents, each representing a stage.
The first element of the returned list is the root of the chain, followed by the second element of the chain, etc.
toList¶
Converts this chain to a list of expressions.
The first element of the returned list is the root of the chain, followed by the second element of the chain, etc.
toString¶
JSON representation of this pipeline.
withStage¶
fun withStage(stage: BsonNode): PipelineChainLink
Equivalent to Pipeline.withStage, but generating a chain link instead.
writeTo¶
@LowLevelApi
fun writeTo(writer: BsonValueWriter)
Equivalent to Pipeline.writeTo.