Details
-
New Feature
-
Status: Closed
-
Minor - P4
-
Resolution: Fixed
-
None
-
Fully Compatible
-
Query 12 (04/04/16)
Description
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.
Attachments
Issue Links
- is depended on by
-
CSHARP-1621 aggregation: Should have a $range operator to generate a sequence.
-
- Closed
-
-
DOCS-8655 Document $range aggregation operator
-
- Closed
-
- related to
-
DRIVERS-297 Aggregation Framework Support for 3.4
-
- Closed
-