Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create gh-pages branch via GitHub

  • Loading branch information...
commit fc9f106c3135bced13d95c924025c439c5590db2 1 parent d85510c
@meritt authored
Showing with 17 additions and 10 deletions.
  1. +16 −9 index.html
  2. +1 −1  params.json
View
25 index.html
@@ -30,10 +30,7 @@ <h1 class="header">easymongo</h1>
</header>
<section>
- <h1>
-<a name="easymongo" class="anchor" href="#easymongo"><span class="octicon octicon-link"></span></a>easymongo</h1>
-
-<p><a href="https://npmjs.org/package/easymongo"><img src="https://img.shields.io/npm/v/easymongo.svg?style=flat" alt="NPM version"></a>
+ <p><a href="https://npmjs.org/package/easymongo"><img src="https://img.shields.io/npm/v/easymongo.svg?style=flat" alt="NPM version"></a>
<a href="https://travis-ci.org/meritt/easymongo"><img src="https://img.shields.io/travis/meritt/easymongo.svg?style=flat" alt="Build status"></a>
<a href="https://coveralls.io/r/meritt/easymongo?branch=master"><img src="https://img.shields.io/coveralls/meritt/easymongo.svg?style=flat" alt="Test coverage"></a>
<a href="https://david-dm.org/meritt/easymongo"><img src="https://img.shields.io/david/meritt/easymongo.svg?style=flat" alt="Dependency status"></a>
@@ -103,7 +100,9 @@ <h1 class="header">easymongo</h1>
<code>server</code> (string || object) — <a href="http://docs.mongodb.org/manual/reference/connection-string/">connection url</a> to MongoDB or object with host, port and dbname</li>
<li>
<code>options</code> (object) — <a href="http://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#connect">optional options</a> for insert command</li>
-</ul><h4>
+</ul>
+
+<h4>
<a name="methods" class="anchor" href="#methods"><span class="octicon octicon-link"></span></a>Methods</h4>
<ul>
@@ -115,7 +114,9 @@ <h1 class="header">easymongo</h1>
</li>
<li>
<code>close()</code> — close the db connection</li>
-</ul><h3>
+</ul>
+
+<h3>
<a name="collection-class" class="anchor" href="#collection-class"><span class="octicon octicon-link"></span></a>Collection class</h3>
<h4>
@@ -130,7 +131,9 @@ <h1 class="header">easymongo</h1>
<li><code>remove([params][, callback])</code></li>
<li><code>removeById(oid[, callback])</code></li>
<li><code>count([params][, callback])</code></li>
-</ul><p>Possible find <code>options</code>:</p>
+</ul>
+
+<p>Possible find <code>options</code>:</p>
<ul>
<li>
@@ -142,7 +145,9 @@ <h1 class="header">easymongo</h1>
<li>
<code>fields</code> — specify fields array to limit fields in returned documents, e.g. <code>["name", "url"]</code>
</li>
-</ul><h2>
+</ul>
+
+<h2>
<a name="flow-control" class="anchor" href="#flow-control"><span class="octicon octicon-link"></span></a>Flow control</h2>
<p>You can use <code>easymongo</code> with <a href="https://github.com/visionmedia/co">co</a> for generator based flow-control. For these purposes use the <a href="https://github.com/meritt/co-easymongo">co-easymongo</a>.</p>
@@ -162,7 +167,9 @@ <h1 class="header">easymongo</h1>
<ul>
<li><a href="https://github.com/meritt">Alexey Simonenko</a></li>
-</ul><h2>
+</ul>
+
+<h2>
<a name="license" class="anchor" href="#license"><span class="octicon octicon-link"></span></a>License</h2>
<p>The MIT License, see the included <code>license.md</code> file.</p>
View
2  params.json
@@ -1 +1 @@
-{"name":"easymongo","tagline":"Simple interface for the MongoDB API","body":"# easymongo\r\n\r\n[![NPM version](https://img.shields.io/npm/v/easymongo.svg?style=flat)](https://npmjs.org/package/easymongo)\r\n[![Build status](https://img.shields.io/travis/meritt/easymongo.svg?style=flat)](https://travis-ci.org/meritt/easymongo)\r\n[![Test coverage](https://img.shields.io/coveralls/meritt/easymongo.svg?style=flat)](https://coveralls.io/r/meritt/easymongo?branch=master)\r\n[![Dependency status](https://img.shields.io/david/meritt/easymongo.svg?style=flat)](https://david-dm.org/meritt/easymongo)\r\n[![devDependency status](https://img.shields.io/david/dev/meritt/easymongo.svg?style=flat)](https://david-dm.org/meritt/easymongo#info=devDependencies)\r\n\r\nThis is a small tweaks for the [native MongoDB driver](https://github.com/mongodb/node-mongodb-native).\r\n\r\n## Installation\r\n\r\n```bash\r\n$ npm install easymongo\r\n```\r\n\r\n## Examples\r\n\r\n```js\r\nvar easymongo = require('easymongo');\r\n\r\nvar mongo = new easymongo({dbname: 'test'});\r\nvar users = mongo.collection('users');\r\n\r\nvar data = {name: 'Alexey', surname: 'Simonenko', url: 'http://simonenko.su'};\r\nusers.save(data, function(error, results) {\r\n // Returns a new document (array).\r\n console.log(results);\r\n});\r\n\r\nusers.find({name: 'Alexey'}, {limit: 2}, function(error, results) {\r\n // Always return array of documents.\r\n console.log(results);\r\n});\r\n\r\nusers.findById('4e4e1638c85e808431000003', function(error, results) {\r\n // Returns a document (object). If error occur then returns false.\r\n console.log(results);\r\n});\r\n\r\nusers.count({name: 'Alexey'}, function(error, results) {\r\n // Amount (int). If error occur then returns zero.\r\n console.log(results);\r\n});\r\n\r\nusers.remove({name: 'Alexey'}, function(error, results) {\r\n // Returns a result of operation (boolean). If error occur then returns false.\r\n console.log(results);\r\n});\r\n\r\nusers.removeById('4e4e1638c85e808431000003', function(error, results) {\r\n // Returns a result of operation (boolean). If error occur then returns false.\r\n console.log(results);\r\n});\r\n```\r\n\r\n## API\r\n\r\n### Client class\r\n\r\n#### Constructor\r\n\r\nArguments:\r\n\r\n * `server` (string || object) — [connection url](http://docs.mongodb.org/manual/reference/connection-string/) to MongoDB or object with host, port and dbname\r\n * `options` (object) — [optional options](http://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#connect) for insert command\r\n\r\n#### Methods\r\n\r\n* `collection(name)` — returns a new instance of the easymongo [Collection class](#collection-class)\r\n* `open(name[, callback])` — returns the [MongoDB Collection](http://mongodb.github.io/node-mongodb-native/api-generated/collection.html)\r\n* `close()` — close the db connection\r\n\r\n### Collection class\r\n\r\n#### Methods\r\n\r\n* `find([params][, options][, callback])`\r\n* `findOne([params][, options][, callback])`\r\n* `findById(oid[, fields][, callback])`\r\n* `save(data[, callback])`\r\n* `update(params, data[, callback])`\r\n* `remove([params][, callback])`\r\n* `removeById(oid[, callback])`\r\n* `count([params][, callback])`\r\n\r\nPossible find `options`:\r\n\r\n* `limit` — to specify the maximum number of documents ([more info](http://docs.mongodb.org/manual/reference/method/cursor.limit/))\r\n* `skip` — to control where MongoDB begins returning results ([more info](http://docs.mongodb.org/manual/reference/method/cursor.skip/))\r\n* `sort` — controls the order that the query returns matching documents ([more info](http://docs.mongodb.org/manual/reference/method/cursor.sort/))\r\n* `fields` — specify fields array to limit fields in returned documents, e.g. `[\"name\", \"url\"]`\r\n\r\n## Flow control\r\n\r\nYou can use `easymongo` with [co](https://github.com/visionmedia/co) for generator based flow-control. For these purposes use the [co-easymongo](https://github.com/meritt/co-easymongo).\r\n\r\n## Contributing\r\n\r\n**DO NOT directly modify the `lib` files.** These files are automatically built from CoffeeScript sources located under the `src` directory.\r\n\r\nTo do build run:\r\n\r\n```bash\r\n$ npm run build\r\n```\r\n\r\n## Author\r\n\r\n - [Alexey Simonenko](https://github.com/meritt)\r\n\r\n## License\r\n\r\nThe MIT License, see the included `license.md` file.","google":"UA-37507032-2","note":"Don't delete this file! It's used internally to help with page regeneration."}
+{"name":"easymongo","tagline":"Simple interface for the MongoDB API","body":"[![NPM version][npm-image]][npm-url]\r\n[![Build status][travis-image]][travis-url]\r\n[![Test coverage][coveralls-image]][coveralls-url]\r\n[![Dependency status][dependency-image]][dependency-url]\r\n[![devDependency status][devdependency-image]][devdependency-url]\r\n\r\nThis is a small tweaks for the [native MongoDB driver](https://github.com/mongodb/node-mongodb-native).\r\n\r\n## Installation\r\n\r\n```bash\r\n$ npm install easymongo\r\n```\r\n\r\n## Examples\r\n\r\n```js\r\nvar easymongo = require('easymongo');\r\n\r\nvar mongo = new easymongo({dbname: 'test'});\r\nvar users = mongo.collection('users');\r\n\r\nvar data = {name: 'Alexey', surname: 'Simonenko', url: 'http://simonenko.su'};\r\nusers.save(data, function(error, results) {\r\n // Returns a new document (array).\r\n console.log(results);\r\n});\r\n\r\nusers.find({name: 'Alexey'}, {limit: 2}, function(error, results) {\r\n // Always return array of documents.\r\n console.log(results);\r\n});\r\n\r\nusers.findById('4e4e1638c85e808431000003', function(error, results) {\r\n // Returns a document (object). If error occur then returns false.\r\n console.log(results);\r\n});\r\n\r\nusers.count({name: 'Alexey'}, function(error, results) {\r\n // Amount (int). If error occur then returns zero.\r\n console.log(results);\r\n});\r\n\r\nusers.remove({name: 'Alexey'}, function(error, results) {\r\n // Returns a result of operation (boolean). If error occur then returns false.\r\n console.log(results);\r\n});\r\n\r\nusers.removeById('4e4e1638c85e808431000003', function(error, results) {\r\n // Returns a result of operation (boolean). If error occur then returns false.\r\n console.log(results);\r\n});\r\n```\r\n\r\n## API\r\n\r\n### Client class\r\n\r\n#### Constructor\r\n\r\nArguments:\r\n\r\n * `server` (string || object) — [connection url](http://docs.mongodb.org/manual/reference/connection-string/) to MongoDB or object with host, port and dbname\r\n * `options` (object) — [optional options](http://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#connect) for insert command\r\n\r\n#### Methods\r\n\r\n* `collection(name)` — returns a new instance of the easymongo [Collection class](#collection-class)\r\n* `open(name[, callback])` — returns the [MongoDB Collection](http://mongodb.github.io/node-mongodb-native/api-generated/collection.html)\r\n* `close()` — close the db connection\r\n\r\n### Collection class\r\n\r\n#### Methods\r\n\r\n* `find([params][, options][, callback])`\r\n* `findOne([params][, options][, callback])`\r\n* `findById(oid[, fields][, callback])`\r\n* `save(data[, callback])`\r\n* `update(params, data[, callback])`\r\n* `remove([params][, callback])`\r\n* `removeById(oid[, callback])`\r\n* `count([params][, callback])`\r\n\r\nPossible find `options`:\r\n\r\n* `limit` — to specify the maximum number of documents ([more info](http://docs.mongodb.org/manual/reference/method/cursor.limit/))\r\n* `skip` — to control where MongoDB begins returning results ([more info](http://docs.mongodb.org/manual/reference/method/cursor.skip/))\r\n* `sort` — controls the order that the query returns matching documents ([more info](http://docs.mongodb.org/manual/reference/method/cursor.sort/))\r\n* `fields` — specify fields array to limit fields in returned documents, e.g. `[\"name\", \"url\"]`\r\n\r\n## Flow control\r\n\r\nYou can use `easymongo` with [co](https://github.com/visionmedia/co) for generator based flow-control. For these purposes use the [co-easymongo](https://github.com/meritt/co-easymongo).\r\n\r\n## Contributing\r\n\r\n**DO NOT directly modify the `lib` files.** These files are automatically built from CoffeeScript sources located under the `src` directory.\r\n\r\nTo do build run:\r\n\r\n```bash\r\n$ npm run build\r\n```\r\n\r\n## Author\r\n\r\n - [Alexey Simonenko](https://github.com/meritt)\r\n\r\n## License\r\n\r\nThe MIT License, see the included `license.md` file.\r\n\r\n[npm-image]: https://img.shields.io/npm/v/easymongo.svg?style=flat\r\n[npm-url]: https://npmjs.org/package/easymongo\r\n[travis-image]: https://img.shields.io/travis/meritt/easymongo.svg?style=flat\r\n[travis-url]: https://travis-ci.org/meritt/easymongo\r\n[coveralls-image]: https://img.shields.io/coveralls/meritt/easymongo.svg?style=flat\r\n[coveralls-url]: https://coveralls.io/r/meritt/easymongo?branch=master\r\n[dependency-image]: https://img.shields.io/david/meritt/easymongo.svg?style=flat\r\n[dependency-url]: https://david-dm.org/meritt/easymongo\r\n[devdependency-image]: https://img.shields.io/david/dev/meritt/easymongo.svg?style=flat\r\n[devdependency-url]: https://david-dm.org/meritt/easymongo#info=devDependencies","google":"UA-37507032-2","note":"Don't delete this file! It's used internally to help with page regeneration."}
Please sign in to comment.
Something went wrong with that request. Please try again.