Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] stdlib: Fixed cursor valid predicate yet again.

  • Loading branch information...
commit 4d612ef2cc5e68b92224ce8531907831fa2fb0e6 1 parent 7a183dc
Norman Scaife nrs135 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  stdlib/apis/mongo/cursor.opa
3  stdlib/apis/mongo/cursor.opa
View
@@ -293,7 +293,8 @@ MongoCursor = {{
valid(c:Mongo.cursor): bool =
not(c.killed)
&& ((not(c.query_sent) && Option.is_some(c.query)) // initialised but not run
- || ((c.returned > 0 && (c.current < c.returned)))) // run and still has data
+ || ((c.returned > 0 && (c.current < c.returned))) // run and still has data
+ || not(MongoCommon.is_null_cursorID(c.cid))) // non-zero cursor, more data on server
/**
* Full [find] function with all parameters.
Please sign in to comment.
Something went wrong with that request. Please try again.