summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-11-24 09:41:33 -0500
committerEliot Horowitz <eliot@10gen.com>2009-11-24 09:41:33 -0500
commitea24725b8e4117f0dc28b0d2b4b22cb9bbdb1f55 (patch)
tree7aaeef08c02c06a71677690f506b4db2c0b76534 /shell
parent4e9630f5d5b613050b9a040f665b534db81ffe03 (diff)
downloadmongo-ea24725b8e4117f0dc28b0d2b4b22cb9bbdb1f55.tar.gz
some command cleaning and query for distinct SERVER-437
Diffstat (limited to 'shell')
-rw-r--r--shell/collection.js4
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;