diff options
author | michael-grunder <michael.grunder@gmail.com> | 2017-04-28 08:30:47 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2017-04-28 08:30:47 +0300 |
commit | a5a0b08f4e9ed9c4bc05c06a08908a49391079e0 (patch) | |
tree | 3c564ee8037dbb6817acb45e354b0b5adf05210f /redis_commands.h | |
parent | bdd287e9f7467656eef65dccefc6f389007b9468 (diff) |
Refactore EVAL command
This commit moves EVAL and EVALSHA command construction to our
redis_commands.c file because as with many other commands we
can share the logic between Redis and RedisCluster.
In addition it removes the last call to the legacy formatting
function redis_cmd_format() which can now be removed.
Diffstat (limited to 'redis_commands.h')
-rw-r--r-- | redis_commands.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/redis_commands.h b/redis_commands.h index 0f61d5ad..018348d4 100644 --- a/redis_commands.h +++ b/redis_commands.h @@ -28,14 +28,6 @@ typedef enum geoSortType { SORT_DESC } geoSortType; -/* GEORADIUS and GEORADIUSBYMEMBER options */ -/*typedef struct geoRadiusOpts = { - int withcoord; - int withdist; - int withhash; - geoSortType sort; -};*/ - /* Construct a raw command */ int redis_build_raw_cmd(zval *z_args, int argc, char **cmd, int *cmd_len TSRMLS_DC); @@ -116,6 +108,9 @@ int redis_zrangebylex_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, int redis_gen_zlex_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char *kw, char **cmd, int *cmd_len, short *slot, void **ctx); +int redis_eval_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, + char *kw, char **cmd, int *cmd_len, short *slot, void **ctx); + /* Commands which need a unique construction mechanism. This is either because * they don't share a signature with any other command, or because there is * specific processing we do (e.g. verifying subarguments) that make them @@ -240,7 +235,7 @@ int redis_command_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx); int redis_fmt_scan_cmd(char **cmd, REDIS_SCAN_TYPE type, char *key, int key_len, - long it, char *pat, int pat_len, long count); + long it, char *pat, int pat_len, long count); int redis_geodist_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx); |