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

Warn users when they are using multiple cursor styles concurrently

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Cursors
    • None
    • Not Needed
    • Not Needed

      Cursors can be used a few ways:

      • as iterators (hasNext/next)
      • as streams (cursor.pipe/cursor.on(..))
      • with a number of "I/O" generating methods like forEach

      If a cursor is used one way, it cannot be reliably used with another style. Mixing styles is also problematic (hasNext followed by forEach). In the future a cursor should be a factory for each style (cursor.stream() should return a new stream, etc), but in the meantime we can warn users if they are using multiple styles concurrently.

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

              Created:
              Updated: