heynemann / motorengine

Motorengine is a port of MongoEngine for Tornado.
http://motorengine.readthedocs.org
204 stars 64 forks source link

Implement avg aggregation #52

Closed heynemann closed 11 years ago

heynemann commented 11 years ago

Implement the average Aggregation as in:

price=Aggregation.avg(Document.price)

This translates to aggregation query:

{ $avg : "$price" }

As can be seen in http://docs.mongodb.org/manual/reference/aggregation/group/#pipe._S_group.

This ticket is related to #46.