-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Use Case
As a Mongosh engineer
I want to know when all the documents from the cursor have been returned
So that I can inform the user if there is more to "it"erate
User Impact
- Breaking change, close used to change to true when there were no more documents, now it changes to true when the cursor id becomes zero
Dependencies
- None
Unknowns
- Internally we probably have logic that now depends on this.
Acceptance Criteria
Implementation Requirements
- Restore close's prior behavior
- Move current behavior to new variable if necessary (possibly one of the other end states suffices already)
Testing Requirements
- Test that close means there are no more documents
Documentation Requirements
- Add API docs to all cursor properties but particularly ones that communicate state.
- closed, killed, id (make a note about zero/nullish)
Follow Up Requirements
- related to
-
NODE-5814 Clarify the abstract cursor's state tracking
- Backlog