diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-11-24 09:41:33 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-11-24 09:41:33 -0500 |
commit | ea24725b8e4117f0dc28b0d2b4b22cb9bbdb1f55 (patch) | |
tree | 7aaeef08c02c06a71677690f506b4db2c0b76534 /shell | |
parent | 4e9630f5d5b613050b9a040f665b534db81ffe03 (diff) | |
download | mongo-ea24725b8e4117f0dc28b0d2b4b22cb9bbdb1f55.tar.gz |
some command cleaning and query for distinct SERVER-437
Diffstat (limited to 'shell')
-rw-r--r-- | shell/collection.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/collection.js b/shell/collection.js index 9a9127073ba..b339e71a35e 100644 --- a/shell/collection.js +++ b/shell/collection.js @@ -465,8 +465,8 @@ DBCollection.prototype.isCapped = function(){ return ( e && e.options && e.options.capped ) ? true : false; } -DBCollection.prototype.distinct = function( keyString ){ - var res = this._dbCommand( { distinct : this._shortName , key : keyString } ); +DBCollection.prototype.distinct = function( keyString , query ){ + var res = this._dbCommand( { distinct : this._shortName , key : keyString , query : query || {} } ); if ( ! res.ok ) throw "distinct failed: " + tojson( res ); return res.values; |