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>2018-01-17 20:36:38 +0300
committermichael-grunder <michael.grunder@gmail.com>2018-01-17 20:36:38 +0300
commit9e65c429318d93bd37c9d42abf79709395e6e805 (patch)
tree379dc0f44cb4b7219eab0c4c31184f734f1d881d /redis_commands.c
parent837dee471ccac86581d306594ee945e82027572f (diff)
Implement UNLINK command
This commit implements UNLINK for Redis, RedisCluster, and RedisArray. To a client library UNLINK behaves identically to DEL so we can use the same handlers for both.
Diffstat (limited to 'redis_commands.c')
-rw-r--r--redis_commands.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis_commands.c b/redis_commands.c
index ac0ed30d..e2db37c6 100644
--- a/redis_commands.c
+++ b/redis_commands.c
@@ -2949,6 +2949,14 @@ int redis_sdiffstore_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
"SDIFFSTORE", sizeof("SDIFFSTORE")-1, 1, 0, cmd, cmd_len, slot);
}
+/* UNLINK */
+int redis_unlink_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
+ char **cmd, int *cmd_len, short *slot, void **ctx)
+{
+ return gen_varkey_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock,
+ "UNLINK", sizeof("UNLINK")-1, 1, 0, cmd, cmd_len, slot);
+}
+
/* COMMAND */
int redis_command_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
char **cmd, int *cmd_len, short *slot, void **ctx)