Skip to content

Commit

Permalink
SERVER-1278 Hook objsLeftInBatch to js code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Lerner committed Jul 22, 2010
1 parent aa586ed commit 419ba81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions shell/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ DBQuery.prototype.next = function(){
return ret;
}

DBQuery.prototype.objsLeftInBatch = function(){
this._exec();

var ret = this._cursor.objsLeftInBatch();
if ( ret.$err )
throw "error: " + tojson( ret );

return ret;
}

DBQuery.prototype.toArray = function(){
if ( this._arr )
return this._arr;
Expand Down

0 comments on commit 419ba81

Please sign in to comment.