Prechádzať zdrojové kódy

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

Daniele Alessandri 15 rokov pred
rodič
commit
b5e2b9eee9
1 zmenil súbory, kde vykonal 7 pridanie a 0 odobranie
  1. 7 0
      lib/Predis.php

+ 7 - 0
lib/Predis.php

@@ -1489,6 +1489,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
                 'hashIncrementBy'       => '\Predis\Commands\HashIncrementBy',
                 'hashIncrementBy'       => '\Predis\Commands\HashIncrementBy',
             'hget'                      => '\Predis\Commands\HashGet',
             'hget'                      => '\Predis\Commands\HashGet',
                 'hashGet'               => '\Predis\Commands\HashGet',
                 'hashGet'               => '\Predis\Commands\HashGet',
+            'hmget'                     => '\Predis\Commands\HashGetMultiple',
+                'hmGetMultiple'         => '\Predis\Commands\HashGetMultiple',
             'hdel'                      => '\Predis\Commands\HashDelete',
             'hdel'                      => '\Predis\Commands\HashDelete',
                 'hashDelete'            => '\Predis\Commands\HashDelete',
                 'hashDelete'            => '\Predis\Commands\HashDelete',
             'hexists'                   => '\Predis\Commands\HashExists',
             'hexists'                   => '\Predis\Commands\HashExists',
@@ -2154,6 +2156,11 @@ class HashGet extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'HGET'; }
     public function getCommandId() { return 'HGET'; }
 }
 }
 
 
+class HashGetMultiple extends \Predis\MultiBulkCommand {
+    public function canBeHashed()  { return false; }
+    public function getCommandId() { return 'HMGET'; }
+}
+
 class HashDelete extends \Predis\MultiBulkCommand {
 class HashDelete extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'HDEL'; }
     public function getCommandId() { return 'HDEL'; }
 }
 }