Explorar o código

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

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
ad540776ac
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      lib/Predis.php

+ 8 - 0
lib/Predis.php

@@ -1084,6 +1084,10 @@ class RedisServer_vNext extends RedisServer_v1_2 {
                 'popFirstBlocking'      => '\Predis\Commands\ListPopFirstBlocking',
             'brpop'                     => '\Predis\Commands\ListPopLastBlocking',
                 'popLastBlocking'       => '\Predis\Commands\ListPopLastBlocking',
+
+            /* commands operating on sorted sets */
+            'zcount'                    => '\Predis\Commands\ZCount',
+                'zsetCount'             => '\Predis\Commands\ZCount',
         ));
     }
 }
@@ -1452,6 +1456,10 @@ class ZSetRangeByScore extends \Predis\InlineCommand {
     public function getCommandId() { return 'ZRANGEBYSCORE'; }
 }
 
+class ZCount extends \Predis\InlineCommand {
+    public function getCommandId() { return 'ZCOUNT'; }
+}
+
 class ZSetCardinality extends \Predis\InlineCommand {
     public function getCommandId() { return 'ZCARD'; }
 }