Closed onlw closed 9 months ago
You can use .buildAggregate
to construct a pipeline using result builders. Then you can add your own AggregateState, an example of which is the implementation of $match
right underneath
You can use
.buildAggregate
to construct a pipeline using result builders. Then you can add your own AggregateState, an example of which is the implementation of$match
right underneath
Thanks for your reply, in fact, I am going to make a mongo GUI tool, the commands are assembled by the user
@onlw using SwiftUI? I've had a similar tool as well :)
@onlw using SwiftUI? I've had a similar tool as well :)
yeah, SwiftUI, It seems that I didn't find the tool
like
query(db.collection.aggregate([ { $group: { _id: { machineId: "$machine.id", reportMonth: "$report_month" }, totalValue: { $sum: "$value" } } }, { $match: { totalValue: { $gt: 1 } } } ]))