Sfoglia il codice sorgente

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

Daniele Alessandri 15 anni fa
parent
commit
c325707559
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      lib/Predis.php

+ 6 - 0
lib/Predis.php

@@ -1077,6 +1077,7 @@ class RedisServer_vNext extends RedisServer_v1_2 {
             /* miscellaneous commands */
             'multi'     => '\Predis\Commands\Multi',
             'exec'      => '\Predis\Commands\Exec',
+            'discard'   => '\Predis\Commands\Discard',
             'append'    => '\Predis\Commands\Append',
 
             /* commands operating on lists */
@@ -1619,6 +1620,11 @@ class Exec extends \Predis\InlineCommand {
     public function getCommandId() { return 'EXEC'; }
 }
 
+class Discard extends \Predis\InlineCommand {
+    public function canBeHashed()  { return false; }
+    public function getCommandId() { return 'DISCARD'; }
+}
+
 class Append extends \Predis\BulkCommand {
     public function getCommandId() { return 'APPEND'; }
 }