Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1621

aggregation: Should have a $range operator to generate a sequence.

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4
    • Affects Version/s: None
    • Component/s: Linq
    • Labels:
      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

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            rathi.gnanasekaran Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: