Comparing version 0.4.3 to 0.4.4
12
index.js
@@ -32,3 +32,3 @@ var mongo = require('mongodb'); | ||
result.password = parsed.auth && parsed.auth.split(':')[1]; | ||
result.db = (parsed.path || '').substr(1); | ||
result.db = (parsed.pathname || '').substr(1); | ||
result.host = parsed.hostname; | ||
@@ -156,2 +156,8 @@ result.port = parsed.port; | ||
}; | ||
Collection.prototype.group = function(group, callback) { | ||
this._exec('group', [group.key, group.cond, group.initial, group.reduce, group.finalize, true], callback); | ||
}; | ||
Collection.prototype.disconnect = function() { | ||
this.close(); | ||
}; | ||
@@ -172,6 +178,2 @@ Collection.prototype._exec = function(name, args) { | ||
Collection.prototype.disconnect = function() { | ||
this.close(); | ||
}; | ||
Object.keys(mongo.Collection.prototype).forEach(function(name) { // we just wanna proxy any remaining methods on collections | ||
@@ -178,0 +180,0 @@ if (shouldExtend(Collection.prototype, mongo.Collection.prototype, name)) { |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["mongo", "db", "mongodb"], | ||
"version":"0.4.3", | ||
"version":"0.4.4", | ||
"repository": {"type": "git", "url": "git://github.com/gett/mongojs.git"}, | ||
@@ -8,0 +8,0 @@ "author": "Ge.tt <hello@ge.tt>", |
@@ -72,7 +72,7 @@ # mongojs | ||
var db = require('mongojs').connect({ | ||
db: 'mydb', // the name of our database | ||
db: 'mydb', // the name of our database | ||
collections: ['mycollection'], // we can pass the collections here also | ||
replSet: { | ||
name: 'myReplSetName', // the name of the replication set | ||
slaveOk: true, // is it ok to read from secondary? defaults to false | ||
name: 'myReplSetName', // the name of the replication set | ||
slaveOk: true, // is it ok to read from secondary? defaults to false | ||
members: ['myserver:myport', 'myotherserver', 'mythirdserver'] | ||
@@ -79,0 +79,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10551
244