New command: ZLEXCOUNT (Redis 2.8.9).

This commit is contained in:
Daniele Alessandri
2014-06-09 11:34:32 +02:00
parent 5a474c5a32
commit 8dbac3dd73
13 changed files with 187 additions and 10 deletions
+1
View File
@@ -139,6 +139,7 @@ class PredisStrategy implements StrategyInterface
'ZSCORE' => $keyIsFirstArgument,
'ZUNIONSTORE' => array($this, 'getKeyFromZsetAggregationCommands'),
'ZSCAN' => $keyIsFirstArgument,
'ZLEXCOUNT' => $keyIsFirstArgument,
/* commands operating on hashes */
'HDEL' => $keyIsFirstArgument,
+1
View File
@@ -124,6 +124,7 @@ class RedisStrategy implements StrategyInterface
'ZREVRANK' => $keyIsFirstArgument,
'ZSCORE' => $keyIsFirstArgument,
'ZSCAN' => $keyIsFirstArgument,
'ZLEXCOUNT' => $keyIsFirstArgument,
/* commands operating on hashes */
'HDEL' => $keyIsFirstArgument,
@@ -152,6 +152,7 @@ class KeyPrefixProcessor implements ProcessorInterface
'PFADD' => 'self::first',
'PFCOUNT' => 'self::all',
'PFMERGE' => 'self::all',
'ZLEXCOUNT' => 'self::first',
);
}
+27
View File
@@ -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\Command;
/**
* @link http://redis.io/commands/zlexcount
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class ZSetLexCount extends Command
{
/**
* {@inheritdoc}
*/
public function getId()
{
return 'ZLEXCOUNT';
}
}
+1
View File
@@ -240,6 +240,7 @@ class RedisVersion280 extends RedisProfile
/* commands operating on sorted sets */
'ZSCAN' => 'Predis\Command\ZSetScan',
'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount',
/* commands operating on hashes */
'HSCAN' => 'Predis\Command\HashScan',
@@ -204,6 +204,7 @@ class ReplicationStrategy
'ZRANK' => true,
'ZREVRANK' => true,
'ZSCAN' => true,
'ZLEXCOUNT' => true,
'HGET' => true,
'HMGET' => true,
'HEXISTS' => true,