value is either a single Bson array value or a MongoCursor (input range) of the requested document type.
MongoCollection.aggregate
Bson aggregate(ARGS...)(ARGS pipeline) @safeCalculates aggregate values for the data in a collection.
Parameters
pipeline | A sequence of data aggregation processes. These can either be given as separate parameters, or as a single array parameter. |
Returns
Returns the list of documents aggregated by the pipeline. The return
Throws
Exception if a DB communication error occurred.
See Also
MongoCursor!R aggregate(R = Bson, S = Bson)(S[] pipeline, AggregateOptions options) @safeditto