-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Change Streams, Find - getMore - KillCursors
-
None
-
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.