New commands: INCRBYFLOAT, HINCRBYFLOAT (Redis v2.6-dev).

This commit is contained in:
Daniele Alessandri
2011-11-18 16:10:39 +01:00
parent 51b998720e
commit 5d04cf540d
4 changed files with 59 additions and 1 deletions
+1 -1
View File
@@ -14,4 +14,4 @@
* Missing tests for commands:
PUBLISH, SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, DEBUG, OBJECT,
CLIENT, CONFIG GET, CONFIG SET, CONFIG RESETSTAT, SLOWLOG, SCRIPT, PTTL,
PSETEX, PEXPIRE, PEXPIREAT
PSETEX, PEXPIRE, PEXPIREAT, INCRBYFLOAT, HINCRBYFLOAT
@@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Predis package.
*
* (c) Daniele Alessandri <suppakilla@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Predis\Commands;
/**
* @link http://redis.io/commands/hincrbyfloat
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class HashIncrementByFloat extends Command
{
/**
* {@inheritdoc}
*/
public function getId()
{
return 'HINCRBYFLOAT';
}
}
@@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Predis package.
*
* (c) Daniele Alessandri <suppakilla@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Predis\Commands;
/**
* @link http://redis.io/commands/incrbyfloat
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class StringIncrementByFloat extends Command
{
/**
* {@inheritdoc}
*/
public function getId()
{
return 'INCRBYFLOAT';
}
}
@@ -39,6 +39,10 @@ class ServerVersionNext extends ServerVersion24
/* commands operating on string values */
'psetex' => '\Predis\Commands\StringPreciseSetExpire',
'incrbyfloat' => '\Predis\Commands\StringIncrementByFloat',
/* commands operating on hashes */
'hincrbyfloat' => '\Predis\Commands\HashIncrementByFloat',
/* scripting */
'eval' => '\Predis\Commands\ServerEval',