-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query-like aggregation #1404
Query-like aggregation #1404
Conversation
Sounds good. Will review next week. On Thu, Mar 28, 2013 at 2:13 AM, Nicolas Joyard notifications@git.luolix.topwrote:
Aaron |
merged for 3.7. Thanks! |
As a followup to #1400, here is my take on more Query-like features for aggregation.
I added an Aggregate constructor with chainable methods; an Aggregate is created when calling Model.aggregate (but the previous syntax still works).
I created methods for each existing operator: group, project (with a Query-like select alternative), skip, limit, geoNear, group, unwind, match and sort.
Everything has jsdoc and tests (in model.aggregate.test.js and aggregate.test.js) that all pass as of my last commit (njoyard@19ce303).
Things that might be useful to add:
Thanks for your feedback !