heynemann / motorengine

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

Implement add_to_set Aggregation #47

Open heynemann opened 11 years ago

heynemann commented 11 years ago

Implement the first Agggregation as in:

price=Aggregation.add_to_set(Document.price)

This translates to aggregation query:

{ $addToSet : "$price" }

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

This ticket is related to #46.