Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Align aggregate api with mongo docs without breaking #60

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

miccarr
Copy link

@miccarr miccarr commented May 10, 2017

Changes the db.collection.aggregate() api to accept both the custom aggregate( step1, step2, …) and the official mongo aggregate( pipeline, options ) notations.

The aggregate() should accept the pipeline as a string, allowing to pass options object.
Does the same as #41 , but keeping compatibility with current notation.

Mongo docs for reference: https://docs.mongodb.org/manual/reference/method/db.collection.aggregate/

Allow the official MongoDB notation `db.collection.aggregate( pipeline [, options] )`, using Array pipeline and giving the ability to pass options.
Custom `db.collection.aggregate( step1, step2, … )` still usable.
@jordymeow
Copy link

This merge would be so welcomed. Is actually promised-mongo abandoned?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants