From 110a9933a3b74ea466078b9f3e0d90a454c70834 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Tue, 1 Apr 2014 16:30:11 -0700 Subject: Initial commit of HyperLogLog commands This is the initial commit of the HyperLogLog probabilistic counting command introduced in Redis. Support for the following commands is implemented * PFADD ... * PFCOUNT * PFMERGE ... --- php_redis.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 80ba22fb..3c802bc6 100644 --- a/php_redis.h +++ b/php_redis.h @@ -195,6 +195,11 @@ PHP_METHOD(Redis, hscan); PHP_METHOD(Redis, sscan); PHP_METHOD(Redis, zscan); +/* HyperLogLog commands */ +PHP_METHOD(Redis, pfadd); +PHP_METHOD(Redis, pfcount); +PHP_METHOD(Redis, pfmerge); + /* Reflection */ PHP_METHOD(Redis, getHost); PHP_METHOD(Redis, getPort); -- cgit v1.2.3 From b1ad5435ff4d8a7d53c747c04f81678a1aa05ce6 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Sat, 30 Aug 2014 11:45:09 -0700 Subject: ZRANGEBYLEX command 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 --- php_redis.h | 1 + 1 file changed, 1 insertion(+) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 437d0df8..23e26310 100644 --- a/php_redis.h +++ b/php_redis.h @@ -111,6 +111,7 @@ PHP_METHOD(Redis, zDelete); PHP_METHOD(Redis, zRange); PHP_METHOD(Redis, zReverseRange); PHP_METHOD(Redis, zRangeByScore); +PHP_METHOD(Redis, zRangeByLex); PHP_METHOD(Redis, zRevRangeByScore); PHP_METHOD(Redis, zCount); PHP_METHOD(Redis, zDeleteRangeByScore); -- cgit v1.2.3 From 837e44358e5b9ed6b6921fee356769ac9e3c66d6 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Mon, 8 Sep 2014 12:43:13 -0700 Subject: Support for the "command" command. 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). --- php_redis.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 23e26310..3c1a41ab 100644 --- a/php_redis.h +++ b/php_redis.h @@ -212,6 +212,8 @@ PHP_METHOD(Redis, isConnected); PHP_METHOD(Redis, getPersistentID); PHP_METHOD(Redis, getAuth); +PHP_METHOD(Redis, command); + #ifdef PHP_WIN32 #define PHP_REDIS_API __declspec(dllexport) #else -- cgit v1.2.3 From a302564c4c9a2800a3ff88def8f900400fbedec2 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Fri, 31 Oct 2014 15:00:59 -0700 Subject: Fix parsing of 'zipped' replies for various uses 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). --- php_redis.h | 1 - 1 file changed, 1 deletion(-) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index e6ec1ef2..5054a321 100644 --- a/php_redis.h +++ b/php_redis.h @@ -235,7 +235,6 @@ PHP_REDIS_API void generic_empty_long_cmd(INTERNAL_FUNCTION_PARAMETERS, char *cm PHP_REDIS_API void generic_subscribe_cmd(INTERNAL_FUNCTION_PARAMETERS, char *sub_cmd); PHP_REDIS_API void generic_unsubscribe_cmd(INTERNAL_FUNCTION_PARAMETERS, char *unsub_cmd); -PHP_REDIS_API void array_zip_values_and_scores(RedisSock *redis_sock, zval *z_tab, int use_atof TSRMLS_DC); PHP_REDIS_API int redis_response_enqueued(RedisSock *redis_sock TSRMLS_DC); PHP_REDIS_API int get_flag(zval *object TSRMLS_DC); -- cgit v1.2.3 From 3edeb29f1acad26686c641c4e1b9ae343d187128 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Sun, 30 Nov 2014 12:24:44 -0800 Subject: Implements the getMode() command This introspection function will inform the caller what mode phpredis is in (atomic, pipeline, multi) --- php_redis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 3c1a41ab..66a84905 100644 --- a/php_redis.h +++ b/php_redis.h @@ -211,7 +211,7 @@ PHP_METHOD(Redis, getReadTimeout); PHP_METHOD(Redis, isConnected); PHP_METHOD(Redis, getPersistentID); PHP_METHOD(Redis, getAuth); - +PHP_METHOD(Redis, getMode); PHP_METHOD(Redis, command); #ifdef PHP_WIN32 -- cgit v1.2.3 From bd7c0b899fda8f219523bd5ed3812e865795be65 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Tue, 9 Dec 2014 11:01:33 -0800 Subject: Rename "command" command to "rawcommand". 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. --- php_redis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 66a84905..596b71c2 100644 --- a/php_redis.h +++ b/php_redis.h @@ -212,7 +212,7 @@ PHP_METHOD(Redis, isConnected); PHP_METHOD(Redis, getPersistentID); PHP_METHOD(Redis, getAuth); PHP_METHOD(Redis, getMode); -PHP_METHOD(Redis, command); +PHP_METHOD(Redis, rawCommand); #ifdef PHP_WIN32 #define PHP_REDIS_API __declspec(dllexport) -- cgit v1.2.3 From 18f368f7055f08de5cbd6d09753f76eb66ede2d2 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Thu, 18 Dec 2014 09:02:48 -0800 Subject: Bump version --- php_redis.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'php_redis.h') diff --git a/php_redis.h b/php_redis.h index 48108573..ba02eb00 100644 --- a/php_redis.h +++ b/php_redis.h @@ -277,7 +277,7 @@ extern zend_module_entry redis_module_entry; #define phpext_redis_ptr redis_module_ptr -#define PHP_REDIS_VERSION "2.2.5" +#define PHP_REDIS_VERSION "2.2.6" #endif -- cgit v1.2.3