diff --git a/lib/mongo-sync.js b/lib/mongo-sync.js index 59fd794..63187d7 100644 --- a/lib/mongo-sync.js +++ b/lib/mongo-sync.js @@ -56,11 +56,13 @@ Server.prototype.close = function() { this._server.close(); }; -function DB(server, name, uri) { +function DB(server, name, uri, db) { this._server = server; this._name = name; // TODO: reimplement this the proper way - if (uri) { + if (db) { + this._db = db; + } else if (uri) { this._db = mongodb.Db; this._db = sync('_db', 'connect').call(this, uri); } else { diff --git a/package.json b/package.json index 5e3eade..0a60144 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "node": ">= 0.10.0" }, "dependencies": { - "mongodb": ">= 1.3.19" + "mongodb": "= 1.3.19" }, "devDependencies": { "common-node": ">= 0.10.7",