Browse Source

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

Daniele Alessandri 15 năm trước cách đây
mục cha
commit
28bac3b3b0
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -1105,6 +1105,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
             /* commands operating on sorted sets */
             'zcount'                    => '\Predis\Commands\ZCount',
                 'zsetCount'             => '\Predis\Commands\ZCount',
+            'zrank'                     => '\Predis\Commands\ZSetRank',
+                'zsetRank'              => '\Predis\Commands\ZSetRank',
         ));
     }
 }
@@ -1500,6 +1502,10 @@ class ZSetRemoveRangeByScore extends \Predis\InlineCommand {
     public function getCommandId() { return 'ZREMRANGEBYSCORE'; }
 }
 
+class ZSetRank extends \Predis\InlineCommand {
+    public function getCommandId() { return 'ZRANK'; }
+}
+
 /* multiple databases handling commands */
 class SelectDatabase extends \Predis\InlineCommand {
     public function canBeHashed()  { return false; }