Add accessors for Cursor.Current and ChangeStream.Current

XMLWordPrintableJSON

    • None
    • Go Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      It’s clunky to iterate a cursor via an interface presently because the only way to fetch the current document is via the .Cursor struct member. The workaround is to define a “dummy” type that implements all the methods needed as wrappers around the cursor type. Adding an accessor to the driver’s types simplify that nicely.

      It would also make the API a bit more consistent: right now all interaction with those types happens via methods except reading the actual document.

      Definition of done

      Add an accessor that returns the .Cursor member.

      Pitfalls

      None that I can see.

            Assignee:
            Unassigned
            Reporter:
            Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: