diff options
author | michael-grunder <michael.grunder@gmail.com> | 2014-06-10 00:12:15 +0400 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2015-05-06 00:42:51 +0300 |
commit | b74a27e10158c5a1ae3f20fc9a83b522c74820cc (patch) | |
tree | 16bbb460ef3eab7c1cdaacbc3172b118258e1d2f /redis_commands.h | |
parent | 05fad67e8888e800126dc94e69d4dda4fae1a78f (diff) |
ZRANGEBYSCORE/ZREVRANGEBYSCORE
Implemented ZRANGEBYSCORE and ZREVRANGEBYSCORE in the new way for
both Redis and RedisCluster objects. In addition, ZRANGE and
ZREVRANGE handling is nearly identical to "BYSCORE" variants, so
made this generic.
Diffstat (limited to 'redis_commands.h')
-rw-r--r-- | redis_commands.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/redis_commands.h b/redis_commands.h index 0feab75c..3205a732 100644 --- a/redis_commands.h +++ b/redis_commands.h @@ -49,8 +49,16 @@ int redis_key_str_str_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, int redis_key_dbl_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char *kw, char **cmd, int *cmd_len, short *slot, void **ctx); +// ZRANGE, ZREVRANGE, ZRANGEBYSCORE, and ZREVRANGEBYSCORE callback type +typedef int (*zrange_cb)(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, + char *,char**,int*,int*,short*,void**); + int redis_zrange_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, - char *kw, char **cmd, int *cmd_len, zend_bool *withscores, short *slot, + char *kw, char **cmd, int *cmd_len, int *withscores, short *slot, + void **ctx); + +int redis_zrangebyscore_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, + char *kw, char **cmd, int *cmd_len, int *withscores, short *slot, void **ctx); /* Commands which need a unique construction mechanism. This is either because @@ -106,7 +114,6 @@ int redis_lrem_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, int redis_smove_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx); - int redis_hset_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx); |