浏览代码

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

Daniele Alessandri 15 年之前
父节点
当前提交
ad540776ac
共有 1 个文件被更改,包括 8 次插入0 次删除
  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'; }
 }