Fix how tailable cursors work. For context: GODRIVER-125.
In particular, Cursor.Next should return false iff
- an error occurred
- the cursorId in the response is 0 and there are no documents left in the current batch of results
Otherwise, it should call the getMore command in a loop until at least one document is returned in the next batch.
Note: this should be done for all cursors, not just tailable. There's nothing in the wire protocol contract that says the server can't return an empty batch with a non-zero cursorId.
Also, consider that the initiating command (e.g. find, aggregate) can return an empty first batch.
- is depended on by
-
GODRIVER-125 Cursor iteration should complete (abnormally) when another goroutine closes the cursor
- Closed
-
GODRIVER-437 Add helpers for database and client level change streams
- Closed