HasLookupPipelineCompatibility¶
interface HasLookupPipelineCompatibility<Document : Any> : Pipeline<Document>
Pipeline that can be used as the foreign collection in a `$lookup stage`.
Instances of this interface should be immutable.
Inheritors¶
Properties¶
context¶
@LowLevelApi
abstract val context: BsonContext
The context used to generate this pipeline.
Functions¶
embedInLookup¶
@LowLevelApi
abstract fun embedInLookup(writer: BsonFieldWriter)
Writes this pipeline's contribution into a $lookup stage.
This method is a low-level API for building custom $lookup stages. Regular users should use HasLookup.lookup instead.
Implementation contract
When a $lookup stage embeds this pipeline as its foreign collection, it calls this method from within the $lookup body. This method should emit the from field, and optionally the pipeline array when the pipeline has stages:
If the pipeline has no stages, pipeline should not be emitted.
See also
HasLookup.lookup: The$lookupstage.
reinterpret¶
@DangerousMongoApi
@LowLevelApi
abstract fun <New : Any> reinterpret(): Pipeline<New>
Changes the type of the returned document, with no type-safety.
toString¶
withStage¶
@DangerousMongoApi
@LowLevelApi
abstract fun withStage(stage: BsonNode): Pipeline<Document>
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.