Browse Source

Fix MGET, SINTER and SUNION to accept also an array to specify the list of keys.

Daniele Alessandri 14 years ago
parent
commit
e5e8a19c7a
2 changed files with 12 additions and 4 deletions
  1. 5 3
      CHANGELOG
  2. 7 1
      lib/Predis.php

+ 5 - 3
CHANGELOG

@@ -9,13 +9,15 @@ v0.6.6 (2011-xx-xx)
 
   * Added support for connecting to Redis using UNIX domain sockets (ISSUE #25).
 
-  * ZUNIONSTORE and ZINTERSTORE can accept an array to specify a list of the 
-    source keys to be used to populate the destination key.
-
   * The "read_write_timeout" connection parameter can now be set to 0 or false 
     to disable read and write timeouts on connections. The old behaviour of -1 
     is still intact.
 
+  * ZUNIONSTORE and ZINTERSTORE can accept an array to specify a list of the 
+    source keys to be used to populate the destination key.
+
+  * MGET, SINTER and SUNION can accept an array to specify the list of keys.
+
   * SUBSCRIBE and PSUBSCRIBE can accept a list of channels for subscription.
 
   * FIX: some client-side clean-ups for MULTI/EXEC were handled incorrectly in 

+ 7 - 1
lib/Predis.php

@@ -2464,6 +2464,9 @@ class Get extends \Predis\MultiBulkCommand {
 class GetMultiple extends \Predis\MultiBulkCommand {
     public function canBeHashed()  { return false; }
     public function getCommandId() { return 'MGET'; }
+    public function filterArguments(Array $arguments) {
+        return \Predis\Shared\Utils::filterArrayArguments($arguments);
+    }
 }
 
 class GetSet extends \Predis\MultiBulkCommand {
@@ -2677,13 +2680,16 @@ class SetIsMember extends \Predis\MultiBulkCommand {
 
 class SetIntersection extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'SINTER'; }
+    public function filterArguments(Array $arguments) {
+        return \Predis\Shared\Utils::filterArrayArguments($arguments);
+    }
 }
 
 class SetIntersectionStore extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'SINTERSTORE'; }
 }
 
-class SetUnion extends \Predis\MultiBulkCommand {
+class SetUnion extends SetIntersection {
     public function getCommandId() { return 'SUNION'; }
 }