mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
Add optional for FCALL and FCALL_RO command json file (#10988)
According to the Redis functions documentation, FCALL command format could be FCALL function_name numberOfKeys [key1, key2, key3.....] [arg1, arg2, arg3.....] So in the json file of fcall and fcall_ro, we should add optional for key and arg part. Just like EVAL... Co-authored-by: Binbin <binloveplay1314@qq.com>
This commit is contained in:
@@ -3352,8 +3352,8 @@ struct redisCommandArg EVAL_RO_Args[] = {
|
||||
struct redisCommandArg FCALL_Args[] = {
|
||||
{"function",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||
{"numkeys",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_MULTIPLE},
|
||||
{"arg",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_MULTIPLE},
|
||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
||||
{"arg",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -3369,8 +3369,8 @@ struct redisCommandArg FCALL_Args[] = {
|
||||
struct redisCommandArg FCALL_RO_Args[] = {
|
||||
{"function",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||
{"numkeys",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_MULTIPLE},
|
||||
{"arg",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_MULTIPLE},
|
||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
||||
{"arg",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,11 +52,13 @@
|
||||
"name": "key",
|
||||
"type": "key",
|
||||
"key_spec_index": 0,
|
||||
"optional": true,
|
||||
"multiple": true
|
||||
},
|
||||
{
|
||||
"name": "arg",
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"multiple": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -51,11 +51,13 @@
|
||||
"name": "key",
|
||||
"type": "key",
|
||||
"key_spec_index": 0,
|
||||
"optional": true,
|
||||
"multiple": true
|
||||
},
|
||||
{
|
||||
"name": "arg",
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"multiple": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user