Comparing version
0.6.1 / 2013-11-24 | ||
================== | ||
* Merge pull request #122 from Philmod/older-mongodb | ||
* older version of mongodb | ||
* Merge pull request #108 from fresheneesz/patch-1 | ||
* Merge pull request #114 from nemtsov/patch-1 | ||
* fix typo: this.hit -> this.hint | ||
* Vastly improving the documentation around the mongoskin.db method | ||
0.6.0 / 2013-07-16 | ||
@@ -3,0 +13,0 @@ ================== |
@@ -126,3 +126,3 @@ /*! | ||
if (this.hint) { | ||
this.collection.hint = this.hit; | ||
this.collection.hint = this.hint; | ||
} | ||
@@ -301,2 +301,2 @@ } | ||
} | ||
}; | ||
}; |
{ | ||
"name": "mongoskin", | ||
"description": "The future layer above node-mongodb-native", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"author": "Gui Lin <guileen@gmail.com>", | ||
@@ -24,3 +24,3 @@ "homepage": "https://github.com/kissjs/node-mongoskin", | ||
"dependencies": { | ||
"mongodb": "1.3.x" | ||
"mongodb": "1.3.19" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
@@ -230,22 +230,24 @@ # mongoskin [](http://travis-ci.org/kissjs/node-mongoskin) [](https://david-dm.org/kissjs/node-mongoskin) | ||
### MongoSkin Url format | ||
### db(serverURL[s], dbOptions, replicasetOptions) | ||
``` | ||
[*://][username:password@]host[:port][/database][?auto_reconnect[=true|false]]` | ||
``` | ||
Get or create instance of [SkinDb](#skindb). | ||
e.g. | ||
Parameters: | ||
* ```serverURLs``` can be a single mongoskin url, or an array of urls, each with the following format: | ||
```[*://][username:password@]host[:port][/database][?auto_reconnect[=true|false]]``` | ||
``` | ||
localhost/blog | ||
mongo://admin:pass@127.0.0.1:27017/blog?auto_reconnect | ||
127.0.0.1?auto_reconnect=false | ||
``` | ||
* ```dbOptions``` is an object that can have following options in it: | ||
* ```database``` - the database to connect to. This overrides the database name passed in the url. | ||
* ```socketOptions``` - mongo socket options (see http://mongodb.github.com/node-mongodb-native/markdown-docs/database.html) | ||
* ```username``` - overrides the value set in the serverURl[s] | ||
* ```password``` - overrides the value set in the serverURl[s] | ||
* other parameters - see http://mongodb.github.io/node-mongodb-native/api-generated/db.html | ||
* ```replicasetOptions``` - mongodb ReplSet options (see http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html). This is only useful if an array of urls is passed. | ||
### db(serverURL[s], dbOptions, replicasetOptions) | ||
Examples: | ||
Get or create instance of [SkinDb](#skindb). | ||
```js | ||
var db = mongoskin.db('localhost:27017/testdb?auto_reconnect=true&poolSize=5'); | ||
var a = mongoskin.db('localhost:27017/testdb?auto_reconnect=true&poolSize=5'); | ||
var b = mongoskin.db('mongo://admin:pass@127.0.0.1:27017/blog?auto_reconnect'); | ||
var c = mongoskin.db('127.0.0.1?auto_reconnect=false'); | ||
``` | ||
@@ -252,0 +254,0 @@ |
110716
1.07%1402
0.07%716
0.28%+ Added
+ Added
- Removed
- Removed
Updated