Permalink
Browse files

mongoclient distinct 'where'.

  • Loading branch information...
1 parent 9ce8a70 commit 85a07eee0e675a6d0f4321d61772618fd2b8bffc @kakserpom committed Nov 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 app-clients/MongoClient.php
@@ -560,7 +560,7 @@ public function evaluate($code, $callback, $key = '') {
/**
* Returns distinct values of the property
- * @param array Hash of properties (offset, limit, opts, key, col)
+ * @param array Hash of properties (offset, limit, opts, key, col, where)
* @param mixed Callback called when response received
* @param string Optional. Distribution key
* @return void
@@ -592,6 +592,10 @@ public function distinct($p, $callback, $key = '') {
'distinct' => $e[1],
'key' => $p['key'],
);
+
+ if (isset($p['where'])) {
+ $query['query'] = $p['where'];
+ }
$packet = pack('V', $p['opts'])
. $e[0] . '.$cmd' . "\x00"

0 comments on commit 85a07ee

Please sign in to comment.