-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Linq
-
None
Syntax
{$range: [<start>, <end>, <step>]}
Example
Input
{_id: 0}
Pipeline
db.coll.aggregate([{ $project: { x: {$range: [0, 6, 2]} } }])
Output
{_id: 0, x: [0, 2, 4]}
Additional Notes
- Should have same semantics as python's range function
- Errors on any non-numeric arguments
- Errors on any non-integral values. Specifically, this code.
- depends on
-
SERVER-20169 aggregation: Should have a $range operator to generate a sequence.
- Closed
- is depended on by
-
DRIVERS-297 Aggregation Framework Support for 3.4
- Closed