Quellcode durchsuchen

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

Daniele Alessandri vor 15 Jahren
Ursprung
Commit
b93b13133d
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 7 0
      lib/Predis.php

+ 7 - 0
lib/Predis.php

@@ -1483,6 +1483,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
             /* commands operating on hashes */
             'hset'                      => '\Predis\Commands\HashSet',
                 'hashSet'               => '\Predis\Commands\HashSet',
+            'hmset'                     => '\Predis\Commands\HashSetMultiple',
+                'hashSetMultiple'       => '\Predis\Commands\HashSetMultiple',
             'hincrby'                   => '\Predis\Commands\HashIncrementBy',
                 'hashIncrementBy'       => '\Predis\Commands\HashIncrementBy',
             'hget'                      => '\Predis\Commands\HashGet',
@@ -2139,6 +2141,11 @@ class HashSet extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'HSET'; }
 }
 
+class HashSetMultiple extends \Predis\MultiBulkCommand {
+    public function canBeHashed()  { return false; }
+    public function getCommandId() { return 'HMSET'; }
+}
+
 class HashIncrementBy extends \Predis\MultiBulkCommand {
     public function getCommandId() { return 'HINCRBY'; }
 }