Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2019-02-24 04:41:19 +0300
committermichael-grunder <michael.grunder@gmail.com>2019-02-24 04:41:19 +0300
commiteb81b9153cb34c7342ae7a0c7f9cba7eadd54c88 (patch)
tree3ab97834c8a78b448aa719da5aab238e144cd78a /redis_cluster.c
parent85419ce7d370dca4d81e9426363ca0ae65c93439 (diff)
parent2ec7d91a7be50eac09567420e2a41e2f3f3f005c (diff)
Merge branch 'issue-1509' into issue.1448-require_php7
Diffstat (limited to 'redis_cluster.c')
-rw-r--r--redis_cluster.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/redis_cluster.c b/redis_cluster.c
index 75f4b6ef..4de9d6c3 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -124,6 +124,8 @@ zend_function_entry redis_cluster_functions[] = {
PHP_ME(RedisCluster, brpop, arginfo_blrpop, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, brpoplpush, arginfo_brpoplpush, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, clearlasterror, arginfo_void, ZEND_ACC_PUBLIC)
+ PHP_ME(RedisCluster, bzpopmax, arginfo_blrpop, ZEND_ACC_PUBLIC)
+ PHP_ME(RedisCluster, bzpopmin, arginfo_blrpop, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, client, arginfo_key_or_address_variadic, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, close, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, cluster, arginfo_key_or_address_variadic, ZEND_ACC_PUBLIC)
@@ -274,6 +276,8 @@ zend_function_entry redis_cluster_functions[] = {
PHP_ME(RedisCluster, zincrby, arginfo_zincrby, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, zinterstore, arginfo_zstore, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, zlexcount, arginfo_key_min_max, ZEND_ACC_PUBLIC)
+ PHP_ME(RedisCluster, zpopmax, arginfo_key, ZEND_ACC_PUBLIC)
+ PHP_ME(RedisCluster, zpopmin, arginfo_key, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, zrange, arginfo_zrange, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, zrangebylex, arginfo_zrangebylex, ZEND_ACC_PUBLIC)
PHP_ME(RedisCluster, zrangebyscore, arginfo_zrangebyscore, ZEND_ACC_PUBLIC)
@@ -1162,13 +1166,13 @@ PHP_METHOD(RedisCluster, rpush) {
/* {{{ proto array RedisCluster::blpop(string key1, ... keyN, long timeout) */
PHP_METHOD(RedisCluster, blpop) {
- CLUSTER_PROCESS_CMD(blpop, cluster_mbulk_resp, 0);
+ CLUSTER_PROCESS_KW_CMD("BLPOP", redis_blocking_pop_cmd, cluster_mbulk_resp, 0);
}
/* }}} */
/* {{{ proto array RedisCluster::brpop(string key1, ... keyN, long timeout */
PHP_METHOD(RedisCluster, brpop) {
- CLUSTER_PROCESS_CMD(brpop, cluster_mbulk_resp, 0);
+ CLUSTER_PROCESS_KW_CMD("BRPOP", redis_blocking_pop_cmd, cluster_mbulk_resp, 0);
}
/* }}} */
@@ -1751,6 +1755,40 @@ PHP_METHOD(RedisCluster, zremrangebylex) {
}
/* }}} */
+/* {{{ proto array RedisCluster::zpopmax(string key) */
+PHP_METHOD(RedisCluster, zpopmax) {
+ if (ZEND_NUM_ARGS() == 1) {
+ CLUSTER_PROCESS_KW_CMD("ZPOPMAX", redis_key_cmd, cluster_mbulk_zipdbl_resp, 0);
+ } else if (ZEND_NUM_ARGS() == 2) {
+ CLUSTER_PROCESS_KW_CMD("ZPOPMAX", redis_key_long_cmd, cluster_mbulk_zipdbl_resp, 0);
+ } else {
+ ZEND_WRONG_PARAM_COUNT();
+ }
+}
+/* }}} */
+
+/* {{{ proto array RedisCluster::zpopmin(string key) */
+PHP_METHOD(RedisCluster, zpopmin) {
+ if (ZEND_NUM_ARGS() == 1) {
+ CLUSTER_PROCESS_KW_CMD("ZPOPMIN", redis_key_cmd, cluster_mbulk_zipdbl_resp, 0);
+ } else if (ZEND_NUM_ARGS() == 2) {
+ CLUSTER_PROCESS_KW_CMD("ZPOPMIN", redis_key_long_cmd, cluster_mbulk_zipdbl_resp, 0);
+ } else {
+ ZEND_WRONG_PARAM_COUNT();
+ }
+}
+/* }}} */
+
+/* {{{ proto array RedisCluster::bzPopMin(Array keys [, timeout]) }}} */
+PHP_METHOD(RedisCluster, bzpopmax) {
+ CLUSTER_PROCESS_KW_CMD("BZPOPMAX", redis_blocking_pop_cmd, cluster_mbulk_resp, 0);
+}
+
+/* {{{ proto array RedisCluster::bzPopMax(Array keys [, timeout]) }}} */
+PHP_METHOD(RedisCluster, bzpopmin) {
+ CLUSTER_PROCESS_KW_CMD("BZPOPMIN", redis_blocking_pop_cmd, cluster_mbulk_resp, 0);
+}
+
/* {{{ proto RedisCluster::sort(string key, array options) */
PHP_METHOD(RedisCluster, sort) {
redisCluster *c = GET_CONTEXT();