Start of an aggregation call. Returns a pipeline with typesafe functions for modifying the pipeline and running it at the end.
auto groupResults = Book.aggregate.groupAll([ "totalPrice": Bson([ "$sum": Bson([ "$multiply": Bson([Bson("$price"), Bson("$quantity")]) ]) ]), "averageQuantity": Bson([ "$avg": Bson("$quantity") ]), "count": Bson(["$sum": Bson(1)]) ]).run;
See Implementation
Start of an aggregation call. Returns a pipeline with typesafe functions for modifying the pipeline and running it at the end.