Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2895

Update AggregateCursor "unwind" method to match the native driver

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.6.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Currently, the unwind method only support to pass the unwind path. The mongodb API is support two more options to pass.

      Current

      collection
        .aggregate()
        .unwind(
          // only support field name here
        )
      

      Improvement

      collection
        .aggregate()
        .unwind(
           // support passing object
          {
            path: path, // field name
            includeArrayIndex: 'string',
            preserveNullAndEmptyArrays: boolean
          }
        )
      

       

            Assignee:
            eric.adum@mongodb.com Eric Adum (Inactive)
            Reporter:
            kaka@kakawebsitedemo.com KaKa NG
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: