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

Aggregation commands are required to have a `cursor` key

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The CRUD spec specifies:

      /**
         * Indicates whether the command will request that the server provide results using a cursor.
         *
         * If true, this option is sent with a value of "cursor: {}". The default value is true.
         * For servers < 2.6, this option is ignored and not sent as aggregation cursors are not available.
         *
         * @see https://docs.mongodb.com/manual/reference/command/aggregate/
         */
        useCursor: Optional<Boolean>;
      

      The node driver does not follow this behavior, and it's become a problem because support was deprecated in version 3.4 of the server, and fully removed in 3.6.

      This will have to be fixed for both the 2.x and 3.x branches of the node driver, with one behavioral change:

      • 2.x will continue to massage the resulting cursor into the expected array form, so as not to break existing applications
      • 3.x will simply always return an aggregation cursor

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: