Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed May 12, 2011
1 parent 682b3ee commit 409356d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/queries.md
Expand Up @@ -20,6 +20,9 @@ Where

The result for the query is actually a cursor object. This can be used directly or converted to an array.

var cursor = collection.find({});
cursor.each(...);

To indicate which fields must or must no be returned `fields` value can be used. For example the following `fields` value

{
Expand Down Expand Up @@ -127,12 +130,16 @@ In addition to OR and conditional operators there's even more

## Query options

Query options define the behavior of the query. For example the following `options` value
Query options define the behavior of the query.

{
"limit": 20
var options = {
"limit": 20,
"skip": 10,
"sort": title
}

collection.find({}, options).toArray(...);

### Paging

Paging can be achieved with option parameters `limit` and `skip`
Expand Down

0 comments on commit 409356d

Please sign in to comment.