mongodb :: MongoPipeline :: add_stage
https://docs.mongodb.com/manual/reference/operator/aggregation/#stage-operators
Each stage is registered as:
{ $<stage>: <json> }
# Add a stage to the pipeline
#
# https://docs.mongodb.com/manual/reference/operator/aggregation/#stage-operators
#
# Each stage is registered as:
# ~~~json
# { $<stage>: <json> }
# ~~~
fun add_stage(stage: String, json: Serializable): MongoPipeline do
var obj = new JsonObject
obj["${stage}"] = json
add obj
return self
end
lib/mongodb/queries.nit:378,2--391,4