Aggregate allow multiple of same stage#4835
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
|
@oallouch Sorry this took so long. How does it look? |
|
Don't be sorry. You rock ! Thx again |
|
@flovilmart How does this look? |
flovilmart
left a comment
There was a problem hiding this comment.
One small nit for the maintainability. Otherwise looks good.
| 'where', | ||
| 'distinct', | ||
| 'project', | ||
| 'addFields', |
There was a problem hiding this comment.
Can we make a list of PIPELINE_KEYS and BASE_KEYS and concat them in ALLOWED_KEYS for readability?
src/Routers/AggregateRouter.js
Outdated
| 'unwind', | ||
| ]; | ||
|
|
||
| const ALLOWED_KEYS = BASE_KEYS.concat(PIPELINE_KEYS); |
There was a problem hiding this comment.
This will mutate BASE_KEYS IIRC :)
There was a problem hiding this comment.
Concat docs say it doesn’t mutate
There was a problem hiding this comment.
Ok my bad, getting a bit rusty :p spread is quite nice :)
* Aggregate Allow Multiple Stages * remove testing files * nit * spread them
* Aggregate Allow Multiple Stages * remove testing files * nit * spread them
* Aggregate Allow Multiple Stages * remove testing files * nit * spread them
Closes: #4682
Also added Mongo 3.6 aggregates stages. (sorted aphabetically)
Will update JS SDK to take array priority over object once merged.