Przeglądaj źródła

New command: ZUNION (Redis v2.0-dev).

Daniele Alessandri 15 lat temu
rodzic
commit
b21b6f8029
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -1196,6 +1196,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
                 'popLastBlocking'       => '\Predis\Commands\ListPopLastBlocking',
 
             /* commands operating on sorted sets */
+            'zunion'                    => '\Predis\Commands\ZSetUnion',
+                'zsetUnion'             => '\Predis\Commands\ZSetUnion',
             'zcount'                    => '\Predis\Commands\ZSetCount',
                 'zsetCount'             => '\Predis\Commands\ZSetCount',
             'zrank'                     => '\Predis\Commands\ZSetRank',
@@ -1655,6 +1657,10 @@ class ZSetRemove extends \Predis\BulkCommand {
     public function parseResponse($data) { return (bool) $data; }
 }
 
+class ZSetUnion extends \Predis\InlineCommand {
+    public function getCommandId() { return 'ZUNION'; }
+}
+
 class ZSetRange extends \Predis\InlineCommand {
     public function getCommandId() { return 'ZRANGE'; }
     public function parseResponse($data) {