Skip to content
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

Aggregate allow multiple of same stage #4835

Merged
merged 5 commits into from
Jun 23, 2018

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jun 14, 2018

Closes: #4682

Also added Mongo 3.6 aggregates stages. (sorted aphabetically)

Will update JS SDK to take array priority over object once merged.

@codecov
Copy link

codecov bot commented Jun 14, 2018

Codecov Report

Merging #4835 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4835      +/-   ##
==========================================
- Coverage    92.8%   92.77%   -0.03%     
==========================================
  Files         119      119              
  Lines        8751     8760       +9     
==========================================
+ Hits         8121     8127       +6     
- Misses        630      633       +3
Impacted Files Coverage Δ
src/Routers/AggregateRouter.js 100% <100%> (ø) ⬆️
src/Adapters/Auth/meetup.js 84.21% <0%> (-5.27%) ⬇️
src/Routers/PushRouter.js 92.85% <0%> (-3.58%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.2% <0%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e93306...ef9fdf0. Read the comment docs.

@dplewis dplewis requested a review from flovilmart June 14, 2018 02:09
@dplewis
Copy link
Member Author

dplewis commented Jun 14, 2018

@oallouch Sorry this took so long. How does it look?

@oallouch
Copy link
Contributor

Don't be sorry. You rock !
Looks good, but I haven't tried it yet.
I'll do it when the sdk-js is out and tell you.

Thx again

@dplewis
Copy link
Member Author

dplewis commented Jun 20, 2018

@flovilmart How does this look?

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit for the maintainability. Otherwise looks good.

@@ -7,57 +7,51 @@ import UsersRouter from './UsersRouter';
const ALLOWED_KEYS = [
'where',
'distinct',
'project',
'addFields',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make a list of PIPELINE_KEYS and BASE_KEYS and concat them in ALLOWED_KEYS for readability?

@@ -34,6 +34,8 @@ const ALLOWED_KEYS = [
'unwind',
];

const ALLOWED_KEYS = BASE_KEYS.concat(PIPELINE_KEYS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will mutate BASE_KEYS IIRC :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concat docs say it doesn’t mutate

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok my bad, getting a bit rusty :p spread is quite nice :)

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright! My bad :/

@dplewis dplewis changed the title Aggregate allow multiple stages Aggregate allow multiple of same stage Jun 23, 2018
@dplewis dplewis merged commit 64388a3 into parse-community:master Jun 23, 2018
@dplewis dplewis deleted the aggregate-multi branch June 23, 2018 16:28
@dplewis dplewis mentioned this pull request Aug 12, 2018
8 tasks
flovilmart pushed a commit that referenced this pull request Aug 12, 2018
* Aggregate Allow Multiple Stages

* remove testing files

* nit

* spread them
flovilmart pushed a commit that referenced this pull request Aug 12, 2018
* Aggregate Allow Multiple Stages

* remove testing files

* nit

* spread them
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Aggregate Allow Multiple Stages

* remove testing files

* nit

* spread them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants