Skip to content

Commit

Permalink
[fix] stdlib: Fixed cursor valid predicate yet again.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrs135 committed Dec 19, 2011
1 parent 7a183dc commit 4d612ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/apis/mongo/cursor.opa
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4d612ef

Please sign in to comment.