Age | Commit message (Collapse) | Author |
|
|
|
|
|
Presently, the sAdd command is variadic, meaning that it takes a key
and then 1 to N additional arguments for the members being added. We
need to keep this functionality to avoid breaking existing code,
but there are good performance and other reasons to have an sAdd
command which takes a key followed by an array of members, which is
what the sAddArray method implements.
|
|
|
|
|
|
Rename command to rawCommand() as it's named in phpredis proper
This introspection function will inform the caller what mode phpredis
is in (atomic, pipeline, multi)
Conflicts:
php_redis.h
|
|
This commit just backports the newer and improved multi-bulk
processing for various commands (e.g. zrange, hmget,etc) from
develop into feature/redis_cluster
Also modified getbit to treat the value as a long
|
|
Implement the new COMMAND command in Redis for both cluster and
non cluster classes. This command is really more of a debug tool
but should actually be useful for updating the unit tests as we
can now simply detect which commands do and don't exist, etc.
|
|
Implemented ZREMRANGEBYLEX in Redis and RedisCluster, and made the
zlexcount command generic, as it has the same semantics.
|
|
Implemented ZREVRANGEBYLEX for Redis and RedisCluster, and made
command construction a generic that can handle either.
|
|
Implemented ROLE and TIME commands in RedisCluster, as well as
updated the TIME command for Redis proper such that we use the
new calling convention.
Updated redis_read_variant_reply to take a context void* so it
conforms with the correct prototype.
|
|
Implemented ZLEXCOUNT for both Redis and RedisCluster.
Removed unused variable in INFO response processor
|
|
Implemented ZRANGEBYLEX for both Redis and RedisCluster
|
|
Implemented the WATCH command for RedisCluster. This command can
take any number of keys, so phpredis splits the request across the
cluster in the best way it can.
For every key in a multiple key command, Redis Cluster requires
that they all hash to the same SLOT, else it will return a
CROSSLOT error and fail.
For WATCH in RedisCluster, a few things to note:
* The command will fail if phpredis is out of sync with the keyspace.
This is because we'll need to know where to deliver each command,
or can't possibly deliver them correctlhy.
* The command will fail if any command delivery failures occur on any
node. This is the case either for a normal communication error or
if RedisCluster returns to us MOVED/ASK redirection.
|
|
Moved our ResultCallback define to the top (before function protos)
as well as moved PHP_REDIS_VERSION define to the very top of php_redis.h
|
|
Implemented ZRANGE and ZREVRANGE for both Redis and cluster.
We can't use generic command processing here as the return type
depends on the optional WITHSCORES bit.
In addition, switched the code around such that zReverseRange is
an alias of zRevRange because ZREVRANGE is the actual Redis
command name.
|
|
Each of the commands that take no arguments can be reworked
such that they use the new calling convention in Redis proper
Impelemnted BITPOS
Removed Redis::resetStat. This isn't a Redis method, but rather
an option on CONFIG, and it probably should be called that way.
|
|
|
|
|
|
Conflicts:
redis.c
References #538
|
|
Redis has actually introduced the "command" command, so it would
be confusing for phpredis to implement arbitrary command processing
as the same function name of an actual Redis command.
|
|
This introspection function will inform the caller what mode phpredis
is in (atomic, pipeline, multi)
|
|
As discovered in issue #523, phpredis was attempting to unserialize
both the keys *and* scores for commands like zRangeByScore. This
had to do with the logic around deserialization in the response.
In addition, this same bug would have caused issues when running
commands like $r->config('get'), because that too, would have tried
to unserialize the values, which we don't want to do.
This commit reworks parsing and zipping up replies by allowing the
call to be configured to unseraialize any combination of keys or
values (or none or both).
|
|
This is a simple addition that allows a client to call any given
Redis command by sending the command name followed by a list of
arguments.
This is useful for the cases where there are new commands in Redis
that have not yet been specifically implemented in phpredis, or
if you want to use phpredis as a pass-through where the commands
and arguments are coming from somewhere else (e.g. monitor logs, etc).
|
|
This commit adds the command ZRANGEBYLEX to phpredis, which was
introduced in 2.8.9. Like with most commands, phpredis will do
some simple validation on the client side, to avoid sending
calls which are not correct (e.g. min/max that aren't valid
for the call, etc).
Addresses #498 and #465
|
|
|
|
Addresses #342
|
|
Conflicts:
redis.c
|
|
Now we should be up to master with upstream for an easier merge.
|
|
This is the initial commit of the HyperLogLog probabilistic counting
command introduced in Redis.
Support for the following commands is implemented
* PFADD <key> <member1> <member2> ... <memberN>
* PFCOUNT <key>
* PFMERGE <dstkey> <srckey1> <srckey2> ... <srckeyN>
|
|
|
|
|
|
This commit introduces the new BITPOS redis command
http://redis.io/commands/bitpos
|
|
This commit adds a utility method as a counterpart to the _unserialize
utility method, allowing users to manually serialize data themselves
before sending it to Redis. This could be useful for calls going through
EVAL, as phpredis can't automatically serialize/unserialize in that case.
Addresses #431
|
|
This commit implements the Redis PUBSUB command, a new command
available since Redis 2.8.0 and described here:
http://redis.io/commands/pubsub
Addresses #427
|
|
This commit introduces support for the Redis SCAN, HSCAN, SSCAN,
and ZSCAN commands.
In the case of HSCAN, SSCAN, and ZSCAN, we take a key and iterator
as required arguments, and for SCAN just an iterator. Matching
the Redis commands, each variant can optionally take a pattern
to match against and a count value which hints at Redis how many
keys to return at a time.
When scanning keys or members (especially with a large keyspace when
searching for a pattern), Redis will sometimes return an empty result
of keys/members. PHPRedis can be set up to abstract this from the
caller by setting:
$redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);
Which instructs PHPRedis to keep retrying the scan until members are
returned OR the iteration completes (Redis returns to us a zero iterator).
By default this option is set to Redis::SCAN_NORETRY, meaning that
empty results are possible, requiring an explicit check for FALSE in the
scanning loop, like so:
```php
$it = NULL;
while(($arr_keys = $redis->scan($it, "*pattern*"))!==FALSE) {
print_r($arr_keys);
}
```
|
|
This commit implements the new WAIT command which currently lives
in redis unstable, along with a unit test.
Also added myself to the README.markdown file, as well as a link to
"the twitter".
|
|
This brings the W32 compilation fixes done by @char101 up to date and
allows building of php_redis.dll with VC11 on Win32 (allows for a php5.5
version).
|
|
|
|
Add support for the various slowlog commands you can execute
in Redis, including:
SLOWLOG GET [len]
SLOWLOG RESET
SLOWLOG LIST
|
|
in the header files
|
|
Conflicts:
php_redis.h
redis.c
|
|
This commit adds methods to get information about the state
of our phpredis object, such as what host/port we are connected
to, our timeout, etc...
The following methods have been added:
getHost()
getPort()
getDBNum()
getTimeout()
getReadTimeout()
isConnected()
getPersistentID()
getAuth()
In addition, there is a small memory leak fix when a persistent id
was specifically passed to connect() (it wasn't beeing freed).
Addresses issue #320
|
|
This commit adds support for the CLIENT commands (list, getname,
setname, kill).
You can call them like so:
$redis->client('list');
$redis->client('getname');
$redis->client('setname', $name);
$redis->client('kill', $ip_port);
Solves issue #300
|
|
|
|
|
|
Implemented PSUBSCRIBE/PUNSUBSCRIBE and changed the present
subscribe and unsubscribe functions into generic versions
that can handle both cases.
|
|
|
|
|
|
|