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

Update hasNext() documentation

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Not Needed

      Based on discussions in NODE-2307, update the hasNext() documentation https://mongodb.github.io/node-mongodb-native/3.3/api/AggregationCursor.html#hasNext

      The documentation implies (to me) that hasNext() would do an asynchronous but fairly immediate check and return either true or false.  That doesn't seem to be the case.  hasNext() seems to actually be waiting for the next item.  It will return true as soon as it gets an item in the changestream.  It will only return false if the changestream is closed.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            lauren.schaefer@mongodb.com Lauren Schaefer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: