Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27900f3

Browse files
Implement new ZSET commands for cluster
* Implement `ZDIFF`, `ZINTER`, `ZUNION`, `ZMSCORE`, and `ZRANDMEMBER` for `RedisCluster`. * Refactor `ZUNIONSTORE` command and switch to using our centralized zset option parsing handler. See #1894
1 parent 40a2c25 commit 27900f3

11 files changed

Lines changed: 374 additions & 217 deletions

cluster_library.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,30 @@ cluster_geosearch_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx)
18081808
}
18091809
}
18101810

1811+
PHP_REDIS_API void
1812+
cluster_zdiff_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx) {
1813+
if (ctx == NULL) {
1814+
cluster_mbulk_raw_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, NULL);
1815+
} else if (ctx == PHPREDIS_CTX_PTR) {
1816+
cluster_mbulk_zipdbl_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, NULL);
1817+
} else {
1818+
ZEND_ASSERT(!"memory corruption?");
1819+
}
1820+
}
1821+
1822+
PHP_REDIS_API void
1823+
cluster_zrandmember_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx) {
1824+
if (ctx == NULL) {
1825+
cluster_bulk_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, NULL);
1826+
} else if (ctx == PHPREDIS_CTX_PTR) {
1827+
cluster_mbulk_raw_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, NULL);
1828+
} else if (ctx == PHPREDIS_CTX_PTR + 1) {
1829+
cluster_mbulk_zipdbl_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, NULL);
1830+
} else {
1831+
ZEND_ASSERT(!"memory corruption?");
1832+
}
1833+
}
1834+
18111835
PHP_REDIS_API void
18121836
cluster_set_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx)
18131837
{
@@ -2689,6 +2713,14 @@ cluster_mbulk_zipdbl_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
26892713
mbulk_resp_loop_zipdbl, NULL);
26902714
}
26912715

2716+
PHP_REDIS_API void
2717+
cluster_mbulk_dbl_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
2718+
void *ctx)
2719+
{
2720+
cluster_gen_mbulk_resp(INTERNAL_FUNCTION_PARAM_PASSTHRU, c,
2721+
mbulk_resp_loop_dbl, ctx);
2722+
}
2723+
26922724
/* Associate multi bulk response (for HMGET really) */
26932725
PHP_REDIS_API void
26942726
cluster_mbulk_assoc_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
@@ -2702,6 +2734,25 @@ cluster_mbulk_assoc_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
27022734
* Various MULTI BULK reply callback functions
27032735
*/
27042736

2737+
int mbulk_resp_loop_dbl(RedisSock *redis_sock, zval *z_result,
2738+
long long count, void *ctx)
2739+
{
2740+
char *line;
2741+
int line_len;
2742+
2743+
while (count--) {
2744+
line = redis_sock_read(redis_sock, &line_len);
2745+
if (line != NULL) {
2746+
add_next_index_double(z_result, atof(line));
2747+
efree(line);
2748+
} else {
2749+
add_next_index_bool(z_result, 0);
2750+
}
2751+
}
2752+
2753+
return SUCCESS;
2754+
}
2755+
27052756
/* MULTI BULK response where we don't touch the values (e.g. KEYS) */
27062757
int mbulk_resp_loop_raw(RedisSock *redis_sock, zval *z_result,
27072758
long long count, void *ctx)

cluster_library.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ PHP_REDIS_API void cluster_lpos_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster
414414
void *ctx);
415415
PHP_REDIS_API void cluster_hrandfield_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
416416
void *ctx);
417+
PHP_REDIS_API void cluster_zdiff_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
418+
void *ctx);
419+
PHP_REDIS_API void cluster_zrandmember_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
420+
void *ctx);
417421
PHP_REDIS_API void cluster_set_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
418422
void *ctx);
419423
PHP_REDIS_API void cluster_geosearch_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
@@ -460,6 +464,8 @@ PHP_REDIS_API void cluster_mbulk_zipstr_resp(INTERNAL_FUNCTION_PARAMETERS,
460464
redisCluster *c, void *ctx);
461465
PHP_REDIS_API void cluster_mbulk_zipdbl_resp(INTERNAL_FUNCTION_PARAMETERS,
462466
redisCluster *c, void *ctx);
467+
PHP_REDIS_API void cluster_mbulk_dbl_resp(INTERNAL_FUNCTION_PARAMETERS,
468+
redisCluster *c, void *ctx);
463469
PHP_REDIS_API void cluster_mbulk_assoc_resp(INTERNAL_FUNCTION_PARAMETERS,
464470
redisCluster *c, void *ctx);
465471
PHP_REDIS_API void cluster_multi_mbulk_resp(INTERNAL_FUNCTION_PARAMETERS,
@@ -513,6 +519,8 @@ int mbulk_resp_loop_raw(RedisSock *redis_sock, zval *z_result,
513519
long long count, void *ctx);
514520
int mbulk_resp_loop_zipstr(RedisSock *redis_sock, zval *z_result,
515521
long long count, void *ctx);
522+
int mbulk_resp_loop_dbl(RedisSock *redis_sock, zval *z_result,
523+
long long count, void *ctx);
516524
int mbulk_resp_loop_zipdbl(RedisSock *redis_sock, zval *z_result,
517525
long long count, void *ctx);
518526
int mbulk_resp_loop_assoc(RedisSock *redis_sock, zval *z_result,

library.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,17 @@ int redis_cmd_append_sstr_key_zstr(smart_string *dst, zend_string *key, RedisSoc
11081108
return redis_cmd_append_sstr_key(dst, ZSTR_VAL(key), ZSTR_LEN(key), redis_sock, slot);
11091109
}
11101110

1111+
int redis_cmd_append_sstr_key_zval(smart_string *dst, zval *zv, RedisSock *redis_sock, short *slot) {
1112+
zend_string *key;
1113+
int res;
1114+
1115+
key = zval_get_string(zv);
1116+
res = redis_cmd_append_sstr_key_zstr(dst, key, redis_sock, slot);
1117+
zend_string_release(key);
1118+
1119+
return res;
1120+
}
1121+
11111122
/* Append an array key to a redis smart string command. This function
11121123
* handles the boilerplate conditionals around string or integer keys */
11131124
int redis_cmd_append_sstr_arrkey(smart_string *cmd, zend_string *kstr, zend_ulong idx)

library.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ int redis_cmd_append_sstr_zstr(smart_string *str, zend_string *zstr);
5151
int redis_cmd_append_sstr_zval(smart_string *str, zval *z, RedisSock *redis_sock);
5252
int redis_cmd_append_sstr_key(smart_string *str, char *key, size_t len, RedisSock *redis_sock, short *slot);
5353
int redis_cmd_append_sstr_key_zstr(smart_string *str, zend_string *key, RedisSock *redis_sock, short *slot);
54+
int redis_cmd_append_sstr_key_zval(smart_string *dst, zval *zv, RedisSock *redis_sock, short *slot);
5455
int redis_cmd_append_sstr_arrkey(smart_string *cmd, zend_string *kstr, zend_ulong idx);
5556

5657
PHP_REDIS_API int redis_spprintf(RedisSock *redis_sock, short *slot, char **ret, char *kw, char *fmt, ...);

redis_cluster.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,10 @@ PHP_METHOD(RedisCluster, zscore) {
11081108
}
11091109
/* }}} */
11101110

1111+
PHP_METHOD(RedisCluster, zmscore) {
1112+
CLUSTER_PROCESS_KW_CMD("ZMSCORE", redis_key_varval_cmd, cluster_mbulk_dbl_resp, 1);
1113+
}
1114+
11111115
/* {{{ proto long RedisCluster::zadd(string key,double score,string mem, ...) */
11121116
PHP_METHOD(RedisCluster, zadd) {
11131117
CLUSTER_PROCESS_CMD(zadd, cluster_long_resp, 0);
@@ -1494,6 +1498,28 @@ PHP_METHOD(RedisCluster, zunionstore) {
14941498
}
14951499
/* }}} */
14961500

1501+
PHP_METHOD(RedisCluster, zdiff) {
1502+
CLUSTER_PROCESS_CMD(zdiff, cluster_zdiff_resp, 1);
1503+
}
1504+
1505+
PHP_METHOD(RedisCluster, zdiffstore) {
1506+
CLUSTER_PROCESS_CMD(zdiffstore, cluster_long_resp, 0);
1507+
}
1508+
1509+
PHP_METHOD(RedisCluster, zinter) {
1510+
CLUSTER_PROCESS_KW_CMD("ZUNION", redis_zinterunion_cmd, cluster_zdiff_resp, 1);
1511+
}
1512+
1513+
PHP_METHOD(RedisCluster, zunion) {
1514+
CLUSTER_PROCESS_KW_CMD("ZINTER", redis_zinterunion_cmd, cluster_zdiff_resp, 1);
1515+
}
1516+
1517+
/* {{{ proto array RedisCluster::zrandmember(string key, array options) */
1518+
PHP_METHOD(RedisCluster, zrandmember) {
1519+
CLUSTER_PROCESS_CMD(zrandmember, cluster_zrandmember_resp, 1);
1520+
}
1521+
1522+
/* }}} */
14971523
/* {{{ proto RedisCluster::zinterstore(string dst, array keys, [array weights,
14981524
* string agg]) */
14991525
PHP_METHOD(RedisCluster, zinterstore) {

redis_cluster.stub.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,11 @@ public function zrange(string $key, mixed $start, mixed $end, array|bool|null $o
10881088
public function zrangestore(string $dstkey, string $srckey, int $start, int $end,
10891089
array|bool|null $options = null): RedisCluster|int|false;
10901090

1091+
/**
1092+
* @see https://redis.io/commands/zRandMember
1093+
*/
1094+
public function zrandmember(string $key, array $options = null): RedisCluster|string|array;
1095+
10911096
/**
10921097
* @see Redis::zrangebylex
10931098
*/
@@ -1153,10 +1158,35 @@ public function zscan(string $key, ?int &$iterator, ?string $pattern = null, int
11531158
*/
11541159
public function zscore(string $key, mixed $member): RedisCluster|float|false;
11551160

1161+
/**
1162+
* @see https://redis.io/commands/zMscore
1163+
*/
1164+
public function zmscore(string $key, mixed $member, mixed ...$other_members): Redis|array|false;
1165+
11561166
/**
11571167
* @see Redis::zunionstore
11581168
*/
11591169
public function zunionstore(string $dst, array $keys, ?array $weights = NULL, ?string $aggregate = NULL): RedisCluster|int|false;
1170+
1171+
/**
1172+
* @see https://redis.io/commands/zinter
1173+
*/
1174+
public function zinter(array $keys, ?array $weights = null, ?array $options = null): RedisCluster|array|false;
1175+
1176+
/**
1177+
* @see https://redis.io/commands/zdiffstore
1178+
*/
1179+
public function zdiffstore(string $dst, array $keys): RedisCluster|int|false;
1180+
1181+
/**
1182+
* @see https://redis.io/commands/zunion
1183+
*/
1184+
public function zunion(array $keys, ?array $weights = null, ?array $options = null): RedisCluster|array|false;
1185+
1186+
/**
1187+
* @see https://redis.io/commands/zdiff
1188+
*/
1189+
public function zdiff(array $keys, array $options = null): RedisCluster|array|false;
11601190
}
11611191

11621192
class RedisClusterException extends RuntimeException {}

redis_cluster_arginfo.h

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: e6c2d8efa4150e1cb198470d8106e693661c1e4f */
2+
* Stub hash: eabecbc2e536faca2a9fcba3c99ad0aeba9721b4 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1)
@@ -948,6 +948,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zrangesto
948948
ZEND_ARG_TYPE_MASK(0, options, MAY_BE_ARRAY|MAY_BE_BOOL|MAY_BE_NULL, "null")
949949
ZEND_END_ARG_INFO()
950950

951+
#define arginfo_class_RedisCluster_zrandmember arginfo_class_RedisCluster_hrandfield
952+
951953
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zrangebylex, 0, 3, RedisCluster, MAY_BE_ARRAY|MAY_BE_FALSE)
952954
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
953955
ZEND_ARG_TYPE_INFO(0, min, IS_STRING, 0)
@@ -1005,13 +1007,37 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zscore, 0
10051007
ZEND_ARG_TYPE_INFO(0, member, IS_MIXED, 0)
10061008
ZEND_END_ARG_INFO()
10071009

1010+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zmscore, 0, 2, Redis, MAY_BE_ARRAY|MAY_BE_FALSE)
1011+
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
1012+
ZEND_ARG_TYPE_INFO(0, member, IS_MIXED, 0)
1013+
ZEND_ARG_VARIADIC_TYPE_INFO(0, other_members, IS_MIXED, 0)
1014+
ZEND_END_ARG_INFO()
1015+
10081016
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zunionstore, 0, 2, RedisCluster, MAY_BE_LONG|MAY_BE_FALSE)
10091017
ZEND_ARG_TYPE_INFO(0, dst, IS_STRING, 0)
10101018
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
10111019
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, weights, IS_ARRAY, 1, "NULL")
10121020
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, aggregate, IS_STRING, 1, "NULL")
10131021
ZEND_END_ARG_INFO()
10141022

1023+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zinter, 0, 1, RedisCluster, MAY_BE_ARRAY|MAY_BE_FALSE)
1024+
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
1025+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, weights, IS_ARRAY, 1, "null")
1026+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null")
1027+
ZEND_END_ARG_INFO()
1028+
1029+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zdiffstore, 0, 2, RedisCluster, MAY_BE_LONG|MAY_BE_FALSE)
1030+
ZEND_ARG_TYPE_INFO(0, dst, IS_STRING, 0)
1031+
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
1032+
ZEND_END_ARG_INFO()
1033+
1034+
#define arginfo_class_RedisCluster_zunion arginfo_class_RedisCluster_zinter
1035+
1036+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_RedisCluster_zdiff, 0, 1, RedisCluster, MAY_BE_ARRAY|MAY_BE_FALSE)
1037+
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
1038+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "null")
1039+
ZEND_END_ARG_INFO()
1040+
10151041

10161042
ZEND_METHOD(RedisCluster, __construct);
10171043
ZEND_METHOD(RedisCluster, _compress);
@@ -1215,6 +1241,7 @@ ZEND_METHOD(RedisCluster, zpopmax);
12151241
ZEND_METHOD(RedisCluster, zpopmin);
12161242
ZEND_METHOD(RedisCluster, zrange);
12171243
ZEND_METHOD(RedisCluster, zrangestore);
1244+
ZEND_METHOD(RedisCluster, zrandmember);
12181245
ZEND_METHOD(RedisCluster, zrangebylex);
12191246
ZEND_METHOD(RedisCluster, zrangebyscore);
12201247
ZEND_METHOD(RedisCluster, zrank);
@@ -1228,7 +1255,12 @@ ZEND_METHOD(RedisCluster, zrevrangebyscore);
12281255
ZEND_METHOD(RedisCluster, zrevrank);
12291256
ZEND_METHOD(RedisCluster, zscan);
12301257
ZEND_METHOD(RedisCluster, zscore);
1258+
ZEND_METHOD(RedisCluster, zmscore);
12311259
ZEND_METHOD(RedisCluster, zunionstore);
1260+
ZEND_METHOD(RedisCluster, zinter);
1261+
ZEND_METHOD(RedisCluster, zdiffstore);
1262+
ZEND_METHOD(RedisCluster, zunion);
1263+
ZEND_METHOD(RedisCluster, zdiff);
12321264

12331265

12341266
static const zend_function_entry class_RedisCluster_methods[] = {
@@ -1434,6 +1466,7 @@ static const zend_function_entry class_RedisCluster_methods[] = {
14341466
ZEND_ME(RedisCluster, zpopmin, arginfo_class_RedisCluster_zpopmin, ZEND_ACC_PUBLIC)
14351467
ZEND_ME(RedisCluster, zrange, arginfo_class_RedisCluster_zrange, ZEND_ACC_PUBLIC)
14361468
ZEND_ME(RedisCluster, zrangestore, arginfo_class_RedisCluster_zrangestore, ZEND_ACC_PUBLIC)
1469+
ZEND_ME(RedisCluster, zrandmember, arginfo_class_RedisCluster_zrandmember, ZEND_ACC_PUBLIC)
14371470
ZEND_ME(RedisCluster, zrangebylex, arginfo_class_RedisCluster_zrangebylex, ZEND_ACC_PUBLIC)
14381471
ZEND_ME(RedisCluster, zrangebyscore, arginfo_class_RedisCluster_zrangebyscore, ZEND_ACC_PUBLIC)
14391472
ZEND_ME(RedisCluster, zrank, arginfo_class_RedisCluster_zrank, ZEND_ACC_PUBLIC)
@@ -1447,7 +1480,12 @@ static const zend_function_entry class_RedisCluster_methods[] = {
14471480
ZEND_ME(RedisCluster, zrevrank, arginfo_class_RedisCluster_zrevrank, ZEND_ACC_PUBLIC)
14481481
ZEND_ME(RedisCluster, zscan, arginfo_class_RedisCluster_zscan, ZEND_ACC_PUBLIC)
14491482
ZEND_ME(RedisCluster, zscore, arginfo_class_RedisCluster_zscore, ZEND_ACC_PUBLIC)
1483+
ZEND_ME(RedisCluster, zmscore, arginfo_class_RedisCluster_zmscore, ZEND_ACC_PUBLIC)
14501484
ZEND_ME(RedisCluster, zunionstore, arginfo_class_RedisCluster_zunionstore, ZEND_ACC_PUBLIC)
1485+
ZEND_ME(RedisCluster, zinter, arginfo_class_RedisCluster_zinter, ZEND_ACC_PUBLIC)
1486+
ZEND_ME(RedisCluster, zdiffstore, arginfo_class_RedisCluster_zdiffstore, ZEND_ACC_PUBLIC)
1487+
ZEND_ME(RedisCluster, zunion, arginfo_class_RedisCluster_zunion, ZEND_ACC_PUBLIC)
1488+
ZEND_ME(RedisCluster, zdiff, arginfo_class_RedisCluster_zdiff, ZEND_ACC_PUBLIC)
14511489
ZEND_FE_END
14521490
};
14531491

redis_cluster_legacy_arginfo.h

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: e6c2d8efa4150e1cb198470d8106e693661c1e4f */
2+
* Stub hash: eabecbc2e536faca2a9fcba3c99ad0aeba9721b4 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
55
ZEND_ARG_INFO(0, name)
@@ -817,6 +817,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_zrangestore, 0, 0, 4)
817817
ZEND_ARG_INFO(0, options)
818818
ZEND_END_ARG_INFO()
819819

820+
#define arginfo_class_RedisCluster_zrandmember arginfo_class_RedisCluster_hrandfield
821+
820822
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_zrangebylex, 0, 0, 3)
821823
ZEND_ARG_INFO(0, key)
822824
ZEND_ARG_INFO(0, min)
@@ -854,8 +856,28 @@ ZEND_END_ARG_INFO()
854856

855857
#define arginfo_class_RedisCluster_zscore arginfo_class_RedisCluster_hexists
856858

859+
#define arginfo_class_RedisCluster_zmscore arginfo_class_RedisCluster_geohash
860+
857861
#define arginfo_class_RedisCluster_zunionstore arginfo_class_RedisCluster_zinterstore
858862

863+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_zinter, 0, 0, 1)
864+
ZEND_ARG_INFO(0, keys)
865+
ZEND_ARG_INFO(0, weights)
866+
ZEND_ARG_INFO(0, options)
867+
ZEND_END_ARG_INFO()
868+
869+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_zdiffstore, 0, 0, 2)
870+
ZEND_ARG_INFO(0, dst)
871+
ZEND_ARG_INFO(0, keys)
872+
ZEND_END_ARG_INFO()
873+
874+
#define arginfo_class_RedisCluster_zunion arginfo_class_RedisCluster_zinter
875+
876+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster_zdiff, 0, 0, 1)
877+
ZEND_ARG_INFO(0, keys)
878+
ZEND_ARG_INFO(0, options)
879+
ZEND_END_ARG_INFO()
880+
859881

860882
ZEND_METHOD(RedisCluster, __construct);
861883
ZEND_METHOD(RedisCluster, _compress);
@@ -1059,6 +1081,7 @@ ZEND_METHOD(RedisCluster, zpopmax);
10591081
ZEND_METHOD(RedisCluster, zpopmin);
10601082
ZEND_METHOD(RedisCluster, zrange);
10611083
ZEND_METHOD(RedisCluster, zrangestore);
1084+
ZEND_METHOD(RedisCluster, zrandmember);
10621085
ZEND_METHOD(RedisCluster, zrangebylex);
10631086
ZEND_METHOD(RedisCluster, zrangebyscore);
10641087
ZEND_METHOD(RedisCluster, zrank);
@@ -1072,7 +1095,12 @@ ZEND_METHOD(RedisCluster, zrevrangebyscore);
10721095
ZEND_METHOD(RedisCluster, zrevrank);
10731096
ZEND_METHOD(RedisCluster, zscan);
10741097
ZEND_METHOD(RedisCluster, zscore);
1098+
ZEND_METHOD(RedisCluster, zmscore);
10751099
ZEND_METHOD(RedisCluster, zunionstore);
1100+
ZEND_METHOD(RedisCluster, zinter);
1101+
ZEND_METHOD(RedisCluster, zdiffstore);
1102+
ZEND_METHOD(RedisCluster, zunion);
1103+
ZEND_METHOD(RedisCluster, zdiff);
10761104

10771105

10781106
static const zend_function_entry class_RedisCluster_methods[] = {
@@ -1278,6 +1306,7 @@ static const zend_function_entry class_RedisCluster_methods[] = {
12781306
ZEND_ME(RedisCluster, zpopmin, arginfo_class_RedisCluster_zpopmin, ZEND_ACC_PUBLIC)
12791307
ZEND_ME(RedisCluster, zrange, arginfo_class_RedisCluster_zrange, ZEND_ACC_PUBLIC)
12801308
ZEND_ME(RedisCluster, zrangestore, arginfo_class_RedisCluster_zrangestore, ZEND_ACC_PUBLIC)
1309+
ZEND_ME(RedisCluster, zrandmember, arginfo_class_RedisCluster_zrandmember, ZEND_ACC_PUBLIC)
12811310
ZEND_ME(RedisCluster, zrangebylex, arginfo_class_RedisCluster_zrangebylex, ZEND_ACC_PUBLIC)
12821311
ZEND_ME(RedisCluster, zrangebyscore, arginfo_class_RedisCluster_zrangebyscore, ZEND_ACC_PUBLIC)
12831312
ZEND_ME(RedisCluster, zrank, arginfo_class_RedisCluster_zrank, ZEND_ACC_PUBLIC)
@@ -1291,7 +1320,12 @@ static const zend_function_entry class_RedisCluster_methods[] = {
12911320
ZEND_ME(RedisCluster, zrevrank, arginfo_class_RedisCluster_zrevrank, ZEND_ACC_PUBLIC)
12921321
ZEND_ME(RedisCluster, zscan, arginfo_class_RedisCluster_zscan, ZEND_ACC_PUBLIC)
12931322
ZEND_ME(RedisCluster, zscore, arginfo_class_RedisCluster_zscore, ZEND_ACC_PUBLIC)
1323+
ZEND_ME(RedisCluster, zmscore, arginfo_class_RedisCluster_zmscore, ZEND_ACC_PUBLIC)
12941324
ZEND_ME(RedisCluster, zunionstore, arginfo_class_RedisCluster_zunionstore, ZEND_ACC_PUBLIC)
1325+
ZEND_ME(RedisCluster, zinter, arginfo_class_RedisCluster_zinter, ZEND_ACC_PUBLIC)
1326+
ZEND_ME(RedisCluster, zdiffstore, arginfo_class_RedisCluster_zdiffstore, ZEND_ACC_PUBLIC)
1327+
ZEND_ME(RedisCluster, zunion, arginfo_class_RedisCluster_zunion, ZEND_ACC_PUBLIC)
1328+
ZEND_ME(RedisCluster, zdiff, arginfo_class_RedisCluster_zdiff, ZEND_ACC_PUBLIC)
12951329
ZEND_FE_END
12961330
};
12971331

0 commit comments

Comments
 (0)