heynemann / motorengine

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

Implement first aggregation #48

Open heynemann opened 10 years ago

heynemann commented 10 years ago

Implement the first Agggregation as in:

price=Aggregation.first(Document.price)

This translates to aggregation query:

{ $first : "$price" }

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

This ticket is related to #46.