Skip to content

Commit

Permalink
fix a couple of returns so shell getLastError works
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Oct 21, 2009
1 parent 4774b56 commit 7301029
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shell/collection.js
Expand Up @@ -151,7 +151,7 @@ DBCollection.prototype.update = function( query , obj , upsert ){
assert( query , "need a query" );
assert( obj , "need an object" );
this._validateObject( obj );
return this._mongo.update( this._fullName , query , obj , upsert ? true : false );
this._mongo.update( this._fullName , query , obj , upsert ? true : false );
}

DBCollection.prototype.save = function( obj ){
Expand Down Expand Up @@ -262,7 +262,6 @@ DBCollection.prototype.ensureIndex = function( keys , options ){
if ( this.getDB().getLastError() == "" ) {
this._indexCache[name] = true;
}

}

DBCollection.prototype.resetIndexCache = function(){
Expand Down Expand Up @@ -298,7 +297,7 @@ DBCollection.prototype.drop = function(){
}

DBCollection.prototype.renameCollection = function( newName ){
return this._db._adminCommand( { renameCollection : this._fullName , to : this._db._name + "." + newName } ).ok;
return this._db._adminCommand( { renameCollection : this._fullName , to : this._db._name + "." + newName } )
}

DBCollection.prototype.validate = function() {
Expand Down

0 comments on commit 7301029

Please sign in to comment.