summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-05 17:28:24 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-05 17:28:24 -0400
commitc9d845038910f6ee04461289b71122e697d4a727 (patch)
treeffa9109628e8154658f40d07e4fadfec66dd8d77 /shell
parent77c36b8c3710a7e079a6db3639346fa00e01a313 (diff)
downloadmongo-c9d845038910f6ee04461289b71122e697d4a727.tar.gz
Spider Monkey: framework mostly done now
Diffstat (limited to 'shell')
-rw-r--r--shell/collection.js7
-rw-r--r--shell/db.js1
-rw-r--r--shell/mongo.js6
3 files changed, 4 insertions, 10 deletions
diff --git a/shell/collection.js b/shell/collection.js
index 85f000cfb60..95d645c4e09 100644
--- a/shell/collection.js
+++ b/shell/collection.js
@@ -13,12 +13,13 @@ if ( ( typeof DBCollection ) == "undefined" ){
}
DBCollection.prototype.verify = function(){
- assert( this._mongo , "no mongo" );
- assert( this._db , "no db" );
- assert( this._shortName , "no shortName" );
assert( this._fullName , "no fullName" );
+ assert( this._shortName , "no shortName" );
+ assert( this._db , "no db" );
assert.eq( this._fullName , this._db._name + "." + this._shortName , "name mismatch" );
+
+ assert( this._mongo , "no mongo in DBCollection" );
}
DBCollection.prototype.getName = function(){
diff --git a/shell/db.js b/shell/db.js
index 25df37be0d8..11401f83d69 100644
--- a/shell/db.js
+++ b/shell/db.js
@@ -2,7 +2,6 @@
if ( typeof DB == "undefined" ){
DB = function( mongo , name ){
- assert( typeof createDB != "function" , "createDB defined, so shouldn't do this" );
this._mongo = mongo;
this._name = name;
}
diff --git a/shell/mongo.js b/shell/mongo.js
index 48a987dff49..5fbba134965 100644
--- a/shell/mongo.js
+++ b/shell/mongo.js
@@ -30,12 +30,6 @@ Mongo.prototype.setSlaveOk = function() {
}
Mongo.prototype.getDB = function( name ){
- if ( typeof createDB == "function" ){
- var newdb = createDB( this , name );
- assert( this == newdb.getMongo() , "createDB sanity check 1" );
- assert( this == newdb._mongo , "createDB sanity check 2" );
- return newdb;
- }
return new DB( this , name );
}