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>,… ]
}
Content copied to clipboard
External resources
See also
The $unionWith
stage.