瀏覽代碼

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

Daniele Alessandri 15 年之前
父節點
當前提交
8391326de6
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -1234,6 +1234,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
                 'hashGet'               => '\Predis\Commands\HashGet',
             'hdel'                      => '\Predis\Commands\HashDelete',
                 'hashDelete'            => '\Predis\Commands\HashDelete',
+            'hlen'                      => '\Predis\Commands\HashLength',
+                'hashLength'            => '\Predis\Commands\HashLength',
             'hkeys'                     => '\Predis\Commands\HashKeys',
                 'hashKeys'              => '\Predis\Commands\HashKeys',
             'hvals'                     => '\Predis\Commands\HashValues',
@@ -1762,6 +1764,10 @@ class HashDelete extends \Predis\BulkCommand {
     public function getCommandId() { return 'HDEL'; }
 }
 
+class HashLength extends \Predis\InlineCommand {
+    public function getCommandId() { return 'HLEN'; }
+}
+
 class HashKeys extends \Predis\InlineCommand {
     public function getCommandId() { return 'HKEYS'; }
 }