robbiblubber.org

help | login | search:  
<<

Home Page
Index

Projects

Utility Suite
Data Suite
Bad Wolf Suite
WeakWiki

User Docs

ConfigNotepad
LED
rqoon
Nuub

Code Docs

.NET
Java
PHP

robbiblubber.org

Specs
Articles

Sources















read  source  history 


find()


MongoDB Driver Function Reference


Retrieves all documents matching the filter criteria from a collection.
More information can be found in the corresponding entry of the MongoDB Manual.



<collection>.find([<filter>[, <options>]])



Arguments


<collection> The target collection.
<filter> A filter expression using query operators.
<options> A BOSN document specifying options.



Options


{ allowDiskUse: <boolean>, allowPartialResults: <boolean>, batchSize: <int>, comment: <string>,
max: <document>, maxAwaitTime: <long>, min: <document>, noCursorTimeout: <boolean>,
returnKey: <boolean>, showRecordId: <boolean>, collation: <document>, hint: <document> }

allowDiskUse Allows to write to disk while executing.
allowPartialResults Allows partial results if some shards are missing.
batchSize Sets the batch size.
comment Sets the comment.
max Sets the maximum key value.
maxAwaitTime Sets the maximum await time (in milliseconds).
min Sets the minimum key value.
noCursorTimeout Sets if the cursor will time out.
returnKey Sets if only index keys will be returned.
showRecordId Sets if the record ID will be added to the result.
collation A document specifying the collation.
hint A document specifying a hint.



Return Value


Returns a result set (cursor).



Example


db.employees.find({ salary: { $gt: 700000 }});


Returns all documents from the employee collection with a salary greater than 700000.




home | MongoDB Driver Function Reference | MongoDB Driver