-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes Stream cursor methods isExhausted(), hasNext() broken #208
Labels
Comments
@SurfinScott Thanks for the bug report! Looks like this is an unexpected side effect of Mongo Hacker's current override of the aggregate() prototype. |
@SurfinScott Fixed this in the 0.1.1 release. I discovered there were a few scenarios where Mongo Hacker was emulating cursor behaviour (from the olden days when Cheers, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MacBook-Pro(mongod-4.0.13-82-g11446b4)[PRIMARY:replset] test> var wc = db.getSiblingDB("test").c.watch();
MacBook-Pro(mongod-4.0.13-82-g11446b4)[PRIMARY:replset] test> while (!wc.isExhausted()) { if ( wc.hasNext() ) { printjson( wc.next() ); } }
2019-12-05T10:48:59.511-0800 E QUERY [js] TypeError: wc.isExhausted is not a function :
@(shell):1:9
MacBook-Pro(mongod-4.0.13-82-g11446b4)[PRIMARY:replset] test> wc
{
"cursor": {
"firstBatch": [ ],
"postBatchResumeToken": {
"_data": "825DE95136000000022B0229296E5A100431CFD77563DF4169A26F16097658B2F804"
},
"id": NumberLong("7421492416343123823"),
"ns": "test.c"
},
"ok": 1,
"operationTime": Timestamp(1575571766, 1),
"$clusterTime": {
"clusterTime": Timestamp(1575571766, 1),
"signature": {
"hash": BinData(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId": NumberLong("0")
}
}
}
MacBook-Pro(mongod-4.0.13-82-g11446b4)[PRIMARY:replset] test> wc.hasNext()
2019-12-05T10:51:48.188-0800 E QUERY [js] TypeError: wc.hasNext is not a function :
@(shell):1:1
Did not test wc.next().
The text was updated successfully, but these errors were encountered: