Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
longbill committed Nov 15, 2014
1 parent 38469ec commit 9ac4ff6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ db.mycollection.find({}).limit(2).skip(1).toArray(function(err, docs) { ... });

For more detailed information about the different usages of update and querying see [the mongo docs](http://www.mongodb.org/display/DOCS/Manual)


## Events

``` js
var db = mongojs('mydb', ['mycollection']);

db.on('error',function(err)
{
console.log('database error', err);
});

db.on('ready',function()
{
console.log('database connected');
})
```


## Streaming cursors

As of `0.7.0` all cursors are a [readable stream](http://nodejs.org/api/stream.html#stream_readable_stream) of objects.
Expand Down

0 comments on commit 9ac4ff6

Please sign in to comment.