diff options
author | michael-grunder <michael.grunder@gmail.com> | 2019-02-13 23:37:27 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2019-02-14 00:07:35 +0300 |
commit | 22d81a94eee2ea613fc515e1d714b73142d46241 (patch) | |
tree | 92338153230ab3758996be6ad701077c596fbb6d /redis_cluster.c | |
parent | 7bc845e8835fdbf14193efe9f076b738082852d5 (diff) |
Implement GEORADIUS_RO and GEORADIUSBYMEMBER_RO
This addresses #1502, #1487
Diffstat (limited to 'redis_cluster.c')
-rw-r--r-- | redis_cluster.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/redis_cluster.c b/redis_cluster.c index 9bc42547..eb4726a3 100644 --- a/redis_cluster.c +++ b/redis_cluster.c @@ -149,7 +149,9 @@ zend_function_entry redis_cluster_functions[] = { PHP_ME(RedisCluster, geohash, arginfo_key_members, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, geopos, arginfo_key_members, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, georadius, arginfo_georadius, ZEND_ACC_PUBLIC) + PHP_ME(RedisCluster, georadius_ro, arginfo_georadius, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, georadiusbymember, arginfo_georadiusbymember, ZEND_ACC_PUBLIC) + PHP_ME(RedisCluster, georadiusbymember_ro, arginfo_georadiusbymember, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, get, arginfo_key, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, getbit, arginfo_key_offset, ZEND_ACC_PUBLIC) PHP_ME(RedisCluster, getlasterror, arginfo_void, ZEND_ACC_PUBLIC) @@ -2953,12 +2955,22 @@ PHP_METHOD(RedisCluster, geodist) { /* {{{ proto array RedisCluster::georadius() }}} */ PHP_METHOD(RedisCluster, georadius) { - CLUSTER_PROCESS_CMD(georadius, cluster_variant_resp, 1); + CLUSTER_PROCESS_KW_CMD("GEORADIUS", redis_georadius_cmd, cluster_variant_resp, 1); +} + +/* {{{ proto array RedisCluster::georadius() }}} */ +PHP_METHOD(RedisCluster, georadius_ro) { + CLUSTER_PROCESS_KW_CMD("GEORADIUS_RO", redis_georadius_cmd, cluster_variant_resp, 1); } /* {{{ proto array RedisCluster::georadiusbymember() }}} */ PHP_METHOD(RedisCluster, georadiusbymember) { - CLUSTER_PROCESS_CMD(georadiusbymember, cluster_variant_resp, 1) + CLUSTER_PROCESS_KW_CMD("GEORADIUSBYMEMBER", redis_georadiusbymember_cmd, cluster_variant_resp, 1); +} + +/* {{{ proto array RedisCluster::georadiusbymember() }}} */ +PHP_METHOD(RedisCluster, georadiusbymember_ro) { + CLUSTER_PROCESS_KW_CMD("GEORADIUSBYMEMBER_RO", redis_georadiusbymember_cmd, cluster_variant_resp, 1); } /* {{{ proto array RedisCluster::role(string key) |