Mongo.cursor
start (
Mongo.db
 
m
, 
string
 
ns
, 
Bson.document
 
query
, 
int
 
limit)
Create and initialise cursor with given query and default options.Example: start(m, ns, query, limit)Intended to form a set of functions to enable the idiom: for(start(...),(c -> ... next(c)),valid).Note: you can't actually use the OPA initial for() function with this idiom without
missing the last element (you can't update the loop variable within the conditional for end of loop).
Use the MongoCursor.for() function instead.Note: MongoDB seems to interpret limit=1 as "just send me one document".
If you want this loop to scan all the documents you can't use limit=1.
This routine prints a warning message because if you only want one document you
would be better using
MongoCursor.find_one.

Comments

The browser you use is not supported by this application, probably because it lacks some critical features.
For a better experience, please consider using this application with a supported browser.