Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-440

Document behavior of using iterator_to_array() with a ChangeStream

    XMLWordPrintableJSON

Details

    • Task
    • Status: Backlog
    • Minor - P4
    • Resolution: Unresolved
    • None
    • None
    • Docs
    • None

    Description

      The example for change stream iteration relies on a manual iteration loop and does not stop iteration when valid() is false. This is standard practice for iterating a tailable cursor.

      That said, some users may still end up using iterator_to_array() to collect events from a change stream. In that case, iteration will naturally stop when no more events are available. We should discuss this on the documentation for the watch() function, alongside any examples for manual iteration.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmikola@mongodb.com Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: