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.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.c')
-rw-r--r--redis.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/redis.c b/redis.c
index c226a48d..15f32f6d 100644
--- a/redis.c
+++ b/redis.c
@@ -390,6 +390,7 @@ static zend_function_entry redis_functions[] = {
PHP_ME(Redis, time, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(Redis, ttl, arginfo_key, ZEND_ACC_PUBLIC)
PHP_ME(Redis, type, arginfo_key, ZEND_ACC_PUBLIC)
+ PHP_ME(Redis, unlink, arginfo_nkeys, ZEND_ACC_PUBLIC)
PHP_ME(Redis, unsubscribe, arginfo_unsubscribe, ZEND_ACC_PUBLIC)
PHP_ME(Redis, unwatch, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(Redis, wait, arginfo_wait, ZEND_ACC_PUBLIC)
@@ -1176,6 +1177,13 @@ PHP_METHOD(Redis, delete)
}
/* }}} */
+/* {{{ proto long Redis::unlink(string $key1, string $key2 [, string $key3...]) }}}
+ * {{{ proto long Redis::unlink(array $keys) */
+PHP_METHOD(Redis, unlink)
+
+ REDIS_PROCESS_CMD(unlink, redis_long_response);
+}
+
PHP_REDIS_API void redis_set_watch(RedisSock *redis_sock)
{
redis_sock->watching = 1;
@@ -1512,6 +1520,7 @@ PHP_METHOD(Redis, sDiffStore) {
}
/* }}} */
+
/* {{{ proto array Redis::sort(string key, array options) */
PHP_METHOD(Redis, sort) {
char *cmd;