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

Simplify cursor `nextFunction` to combine cursor initialization and initial find command

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.11
    • Affects Version/s: None
    • Component/s: Core
    • Labels:
      None

      The current implementation of core's nextFunction is incredibly complex, and makes a number of recursive calls needlessly. We should simplify this code path, primarily ensuring that cursor initialization also makes the first find command call. This will allows for the next step in the wire protocol refactor, which is to make WireProtocol.prototype.command actually take a callback, and provide a consistent API across wire protocol methods.

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

              Created:
              Updated:
              Resolved: