Przeglądaj źródła

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

Daniele Alessandri 15 lat temu
rodzic
commit
0b229a5057
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      lib/Predis.php

+ 5 - 0
lib/Predis.php

@@ -1094,6 +1094,7 @@ class RedisServer_vNext extends RedisServer_v1_2 {
 
             /* commands operating on string values */
             'append'    => '\Predis\Commands\Append',
+            'substr'    => '\Predis\Commands\Substr',
 
             /* commands operating on lists */
             'blpop'                     => '\Predis\Commands\ListPopFirstBlocking',
@@ -1271,6 +1272,10 @@ class Append extends \Predis\BulkCommand {
     public function getCommandId() { return 'APPEND'; }
 }
 
+class Substr extends \Predis\InlineCommand {
+    public function getCommandId() { return 'SUBSTR'; }
+}
+
 /* commands operating on the key space */
 class Keys extends \Predis\InlineCommand {
     public function canBeHashed()  { return false; }