[SERVER-18917] DBCommandCursor::next() shell method shouldn't require calling hasNext first Created: 10/Jun/15  Updated: 07/Dec/16  Resolved: 29/Jun/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.1.6

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Quint Iteration 5, Quint Iteration 6
Participants:

 Description   

In the current interface between the shell and the c++ driver, hasNext() is what fetches the results from the server if at the end of the current batch. next() just reads from the current batch. DBQuery smooths over this weirdness by calling hasNext() from next() and throwing if it returns false. DBCommandCursor should do the same.



 Comments   
Comment by Githook User [ 29/Jun/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-18917 make DBCommandCursor::next() shell method not require calling hasNext() first

In the current interface between the shell and the c++ driver, hasNext() is
what fetches the results from the server if at the end of the current batch.
next() just reads from the current batch. DBQuery smooths over this weirdness
by calling hasNext() from next() and throwing if it returns false.
DBCommandCursor should do the same.
Branch: master
https://github.com/mongodb/mongo/commit/6acbfbba4f2e9e33221d71f2241642b6f9d2e479

Generated at Thu Feb 08 03:49:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.