Fixes commands' syntices (#10534)
Fixes in command argument in json files * Fixes BITFIELD's syntax ("sub-commands" can be repeated, and OVERFLOW is only valid for SET and INCR) * Improves readability of SET (reordered) * Fixes GEOSEARCH and GEOSEARCH_RO syntices (use `oneof` for mutually exclusive group instead of `optional`) * Fixes MIGRATE syntax (use `oneof` for mutually exclusive group instead of `optional`) * Fixes MODULE LOADEX syntax (the `CONFIG` token should be repeated too when using multiple configs) other: * make generate-command-help.rb accept a path to commands.json, or read it from stdin (e.g. `generate-commands-json.py | generate-command-help.rb -`)
This commit is contained in:
parent
f110de4b23
commit
3e09a8c097
|
@ -15,3 +15,4 @@ tre
|
||||||
cancelability
|
cancelability
|
||||||
ist
|
ist
|
||||||
statics
|
statics
|
||||||
|
filetest
|
||||||
|
|
188
src/commands.c
188
src/commands.c
|
@ -47,44 +47,62 @@ struct redisCommandArg BITCOUNT_Args[] = {
|
||||||
/* BITFIELD tips */
|
/* BITFIELD tips */
|
||||||
#define BITFIELD_tips NULL
|
#define BITFIELD_tips NULL
|
||||||
|
|
||||||
/* BITFIELD encoding_offset argument table */
|
/* BITFIELD operation encoding_offset argument table */
|
||||||
struct redisCommandArg BITFIELD_encoding_offset_Subargs[] = {
|
struct redisCommandArg BITFIELD_operation_encoding_offset_Subargs[] = {
|
||||||
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* BITFIELD encoding_offset_value argument table */
|
/* BITFIELD operation write wrap_sat_fail argument table */
|
||||||
struct redisCommandArg BITFIELD_encoding_offset_value_Subargs[] = {
|
struct redisCommandArg BITFIELD_operation_write_wrap_sat_fail_Subargs[] = {
|
||||||
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{"value",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* BITFIELD encoding_offset_increment argument table */
|
|
||||||
struct redisCommandArg BITFIELD_encoding_offset_increment_Subargs[] = {
|
|
||||||
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{"increment",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* BITFIELD wrap_sat_fail argument table */
|
|
||||||
struct redisCommandArg BITFIELD_wrap_sat_fail_Subargs[] = {
|
|
||||||
{"wrap",ARG_TYPE_PURE_TOKEN,-1,"WRAP",NULL,NULL,CMD_ARG_NONE},
|
{"wrap",ARG_TYPE_PURE_TOKEN,-1,"WRAP",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"sat",ARG_TYPE_PURE_TOKEN,-1,"SAT",NULL,NULL,CMD_ARG_NONE},
|
{"sat",ARG_TYPE_PURE_TOKEN,-1,"SAT",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"fail",ARG_TYPE_PURE_TOKEN,-1,"FAIL",NULL,NULL,CMD_ARG_NONE},
|
{"fail",ARG_TYPE_PURE_TOKEN,-1,"FAIL",NULL,NULL,CMD_ARG_NONE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* BITFIELD operation write write_operation encoding_offset_value argument table */
|
||||||
|
struct redisCommandArg BITFIELD_operation_write_write_operation_encoding_offset_value_Subargs[] = {
|
||||||
|
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"value",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* BITFIELD operation write write_operation encoding_offset_increment argument table */
|
||||||
|
struct redisCommandArg BITFIELD_operation_write_write_operation_encoding_offset_increment_Subargs[] = {
|
||||||
|
{"encoding",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"offset",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"increment",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* BITFIELD operation write write_operation argument table */
|
||||||
|
struct redisCommandArg BITFIELD_operation_write_write_operation_Subargs[] = {
|
||||||
|
{"encoding_offset_value",ARG_TYPE_BLOCK,-1,"SET",NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_operation_write_write_operation_encoding_offset_value_Subargs},
|
||||||
|
{"encoding_offset_increment",ARG_TYPE_BLOCK,-1,"INCRBY",NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_operation_write_write_operation_encoding_offset_increment_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* BITFIELD operation write argument table */
|
||||||
|
struct redisCommandArg BITFIELD_operation_write_Subargs[] = {
|
||||||
|
{"wrap_sat_fail",ARG_TYPE_ONEOF,-1,"OVERFLOW",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=BITFIELD_operation_write_wrap_sat_fail_Subargs},
|
||||||
|
{"write_operation",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_operation_write_write_operation_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* BITFIELD operation argument table */
|
||||||
|
struct redisCommandArg BITFIELD_operation_Subargs[] = {
|
||||||
|
{"encoding_offset",ARG_TYPE_BLOCK,-1,"GET",NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_operation_encoding_offset_Subargs},
|
||||||
|
{"write",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_operation_write_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
/* BITFIELD argument table */
|
/* BITFIELD argument table */
|
||||||
struct redisCommandArg BITFIELD_Args[] = {
|
struct redisCommandArg BITFIELD_Args[] = {
|
||||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"encoding_offset",ARG_TYPE_BLOCK,-1,"GET",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=BITFIELD_encoding_offset_Subargs},
|
{"operation",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_MULTIPLE,.subargs=BITFIELD_operation_Subargs},
|
||||||
{"encoding_offset_value",ARG_TYPE_BLOCK,-1,"SET",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=BITFIELD_encoding_offset_value_Subargs},
|
|
||||||
{"encoding_offset_increment",ARG_TYPE_BLOCK,-1,"INCRBY",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=BITFIELD_encoding_offset_increment_Subargs},
|
|
||||||
{"wrap_sat_fail",ARG_TYPE_ONEOF,-1,"OVERFLOW",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=BITFIELD_wrap_sat_fail_Subargs},
|
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,7 +124,7 @@ struct redisCommandArg BITFIELD_RO_encoding_offset_Subargs[] = {
|
||||||
/* BITFIELD_RO argument table */
|
/* BITFIELD_RO argument table */
|
||||||
struct redisCommandArg BITFIELD_RO_Args[] = {
|
struct redisCommandArg BITFIELD_RO_Args[] = {
|
||||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"encoding_offset",ARG_TYPE_BLOCK,-1,"GET",NULL,NULL,CMD_ARG_NONE,.subargs=BITFIELD_RO_encoding_offset_Subargs},
|
{"encoding_offset",ARG_TYPE_BLOCK,-1,"GET",NULL,NULL,CMD_ARG_MULTIPLE,.subargs=BITFIELD_RO_encoding_offset_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1313,13 +1331,20 @@ struct redisCommandArg MIGRATE_key_or_empty_string_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* MIGRATE username_password argument table */
|
/* MIGRATE authentication username_password argument table */
|
||||||
struct redisCommandArg MIGRATE_username_password_Subargs[] = {
|
struct redisCommandArg MIGRATE_authentication_username_password_Subargs[] = {
|
||||||
{"username",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"username",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"password",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"password",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* MIGRATE authentication argument table */
|
||||||
|
struct redisCommandArg MIGRATE_authentication_Subargs[] = {
|
||||||
|
{"password",ARG_TYPE_STRING,-1,"AUTH",NULL,"4.0.7",CMD_ARG_OPTIONAL},
|
||||||
|
{"username_password",ARG_TYPE_BLOCK,-1,"AUTH2",NULL,"6.0.0",CMD_ARG_OPTIONAL,.subargs=MIGRATE_authentication_username_password_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
/* MIGRATE argument table */
|
/* MIGRATE argument table */
|
||||||
struct redisCommandArg MIGRATE_Args[] = {
|
struct redisCommandArg MIGRATE_Args[] = {
|
||||||
{"host",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"host",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
|
@ -1329,8 +1354,7 @@ struct redisCommandArg MIGRATE_Args[] = {
|
||||||
{"timeout",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"timeout",ARG_TYPE_INTEGER,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"copy",ARG_TYPE_PURE_TOKEN,-1,"COPY",NULL,"3.0.0",CMD_ARG_OPTIONAL},
|
{"copy",ARG_TYPE_PURE_TOKEN,-1,"COPY",NULL,"3.0.0",CMD_ARG_OPTIONAL},
|
||||||
{"replace",ARG_TYPE_PURE_TOKEN,-1,"REPLACE",NULL,"3.0.0",CMD_ARG_OPTIONAL},
|
{"replace",ARG_TYPE_PURE_TOKEN,-1,"REPLACE",NULL,"3.0.0",CMD_ARG_OPTIONAL},
|
||||||
{"password",ARG_TYPE_STRING,-1,"AUTH",NULL,"4.0.7",CMD_ARG_OPTIONAL},
|
{"authentication",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=MIGRATE_authentication_Subargs},
|
||||||
{"username_password",ARG_TYPE_BLOCK,-1,"AUTH2",NULL,"6.0.0",CMD_ARG_OPTIONAL,.subargs=MIGRATE_username_password_Subargs},
|
|
||||||
{"key",ARG_TYPE_KEY,1,"KEYS",NULL,"3.0.6",CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
{"key",ARG_TYPE_KEY,1,"KEYS",NULL,"3.0.6",CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
@ -2089,15 +2113,22 @@ struct redisCommandArg GEORADIUS_RO_Args[] = {
|
||||||
/* GEOSEARCH tips */
|
/* GEOSEARCH tips */
|
||||||
#define GEOSEARCH_tips NULL
|
#define GEOSEARCH_tips NULL
|
||||||
|
|
||||||
/* GEOSEARCH longitude_latitude argument table */
|
/* GEOSEARCH from longitude_latitude argument table */
|
||||||
struct redisCommandArg GEOSEARCH_longitude_latitude_Subargs[] = {
|
struct redisCommandArg GEOSEARCH_from_longitude_latitude_Subargs[] = {
|
||||||
{"longitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"longitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"latitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"latitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCH circle unit argument table */
|
/* GEOSEARCH from argument table */
|
||||||
struct redisCommandArg GEOSEARCH_circle_unit_Subargs[] = {
|
struct redisCommandArg GEOSEARCH_from_Subargs[] = {
|
||||||
|
{"member",ARG_TYPE_STRING,-1,"FROMMEMBER",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"longitude_latitude",ARG_TYPE_BLOCK,-1,"FROMLONLAT",NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_from_longitude_latitude_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* GEOSEARCH by circle unit argument table */
|
||||||
|
struct redisCommandArg GEOSEARCH_by_circle_unit_Subargs[] = {
|
||||||
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
@ -2105,15 +2136,15 @@ struct redisCommandArg GEOSEARCH_circle_unit_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCH circle argument table */
|
/* GEOSEARCH by circle argument table */
|
||||||
struct redisCommandArg GEOSEARCH_circle_Subargs[] = {
|
struct redisCommandArg GEOSEARCH_by_circle_Subargs[] = {
|
||||||
{"radius",ARG_TYPE_DOUBLE,-1,"BYRADIUS",NULL,NULL,CMD_ARG_NONE},
|
{"radius",ARG_TYPE_DOUBLE,-1,"BYRADIUS",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_circle_unit_Subargs},
|
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_by_circle_unit_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCH box unit argument table */
|
/* GEOSEARCH by box unit argument table */
|
||||||
struct redisCommandArg GEOSEARCH_box_unit_Subargs[] = {
|
struct redisCommandArg GEOSEARCH_by_box_unit_Subargs[] = {
|
||||||
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
@ -2121,11 +2152,18 @@ struct redisCommandArg GEOSEARCH_box_unit_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCH box argument table */
|
/* GEOSEARCH by box argument table */
|
||||||
struct redisCommandArg GEOSEARCH_box_Subargs[] = {
|
struct redisCommandArg GEOSEARCH_by_box_Subargs[] = {
|
||||||
{"width",ARG_TYPE_DOUBLE,-1,"BYBOX",NULL,NULL,CMD_ARG_NONE},
|
{"width",ARG_TYPE_DOUBLE,-1,"BYBOX",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"height",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"height",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_box_unit_Subargs},
|
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_by_box_unit_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* GEOSEARCH by argument table */
|
||||||
|
struct redisCommandArg GEOSEARCH_by_Subargs[] = {
|
||||||
|
{"circle",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_by_circle_Subargs},
|
||||||
|
{"box",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_by_box_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2146,10 +2184,8 @@ struct redisCommandArg GEOSEARCH_count_Subargs[] = {
|
||||||
/* GEOSEARCH argument table */
|
/* GEOSEARCH argument table */
|
||||||
struct redisCommandArg GEOSEARCH_Args[] = {
|
struct redisCommandArg GEOSEARCH_Args[] = {
|
||||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"member",ARG_TYPE_STRING,-1,"FROMMEMBER",NULL,NULL,CMD_ARG_OPTIONAL},
|
{"from",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_from_Subargs},
|
||||||
{"longitude_latitude",ARG_TYPE_BLOCK,-1,"FROMLONLAT",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_longitude_latitude_Subargs},
|
{"by",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCH_by_Subargs},
|
||||||
{"circle",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_circle_Subargs},
|
|
||||||
{"box",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_box_Subargs},
|
|
||||||
{"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_order_Subargs},
|
{"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_order_Subargs},
|
||||||
{"count",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_count_Subargs},
|
{"count",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCH_count_Subargs},
|
||||||
{"withcoord",ARG_TYPE_PURE_TOKEN,-1,"WITHCOORD",NULL,NULL,CMD_ARG_OPTIONAL},
|
{"withcoord",ARG_TYPE_PURE_TOKEN,-1,"WITHCOORD",NULL,NULL,CMD_ARG_OPTIONAL},
|
||||||
|
@ -2166,15 +2202,22 @@ struct redisCommandArg GEOSEARCH_Args[] = {
|
||||||
/* GEOSEARCHSTORE tips */
|
/* GEOSEARCHSTORE tips */
|
||||||
#define GEOSEARCHSTORE_tips NULL
|
#define GEOSEARCHSTORE_tips NULL
|
||||||
|
|
||||||
/* GEOSEARCHSTORE longitude_latitude argument table */
|
/* GEOSEARCHSTORE from longitude_latitude argument table */
|
||||||
struct redisCommandArg GEOSEARCHSTORE_longitude_latitude_Subargs[] = {
|
struct redisCommandArg GEOSEARCHSTORE_from_longitude_latitude_Subargs[] = {
|
||||||
{"longitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"longitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"latitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"latitude",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCHSTORE circle unit argument table */
|
/* GEOSEARCHSTORE from argument table */
|
||||||
struct redisCommandArg GEOSEARCHSTORE_circle_unit_Subargs[] = {
|
struct redisCommandArg GEOSEARCHSTORE_from_Subargs[] = {
|
||||||
|
{"member",ARG_TYPE_STRING,-1,"FROMMEMBER",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"longitude_latitude",ARG_TYPE_BLOCK,-1,"FROMLONLAT",NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_from_longitude_latitude_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* GEOSEARCHSTORE by circle unit argument table */
|
||||||
|
struct redisCommandArg GEOSEARCHSTORE_by_circle_unit_Subargs[] = {
|
||||||
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
@ -2182,15 +2225,15 @@ struct redisCommandArg GEOSEARCHSTORE_circle_unit_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCHSTORE circle argument table */
|
/* GEOSEARCHSTORE by circle argument table */
|
||||||
struct redisCommandArg GEOSEARCHSTORE_circle_Subargs[] = {
|
struct redisCommandArg GEOSEARCHSTORE_by_circle_Subargs[] = {
|
||||||
{"radius",ARG_TYPE_DOUBLE,-1,"BYRADIUS",NULL,NULL,CMD_ARG_NONE},
|
{"radius",ARG_TYPE_DOUBLE,-1,"BYRADIUS",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_circle_unit_Subargs},
|
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_by_circle_unit_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCHSTORE box unit argument table */
|
/* GEOSEARCHSTORE by box unit argument table */
|
||||||
struct redisCommandArg GEOSEARCHSTORE_box_unit_Subargs[] = {
|
struct redisCommandArg GEOSEARCHSTORE_by_box_unit_Subargs[] = {
|
||||||
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
{"m",ARG_TYPE_PURE_TOKEN,-1,"M",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
{"km",ARG_TYPE_PURE_TOKEN,-1,"KM",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
{"ft",ARG_TYPE_PURE_TOKEN,-1,"FT",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
@ -2198,11 +2241,18 @@ struct redisCommandArg GEOSEARCHSTORE_box_unit_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GEOSEARCHSTORE box argument table */
|
/* GEOSEARCHSTORE by box argument table */
|
||||||
struct redisCommandArg GEOSEARCHSTORE_box_Subargs[] = {
|
struct redisCommandArg GEOSEARCHSTORE_by_box_Subargs[] = {
|
||||||
{"width",ARG_TYPE_DOUBLE,-1,"BYBOX",NULL,NULL,CMD_ARG_NONE},
|
{"width",ARG_TYPE_DOUBLE,-1,"BYBOX",NULL,NULL,CMD_ARG_NONE},
|
||||||
{"height",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"height",ARG_TYPE_DOUBLE,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_box_unit_Subargs},
|
{"unit",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_by_box_unit_Subargs},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* GEOSEARCHSTORE by argument table */
|
||||||
|
struct redisCommandArg GEOSEARCHSTORE_by_Subargs[] = {
|
||||||
|
{"circle",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_by_circle_Subargs},
|
||||||
|
{"box",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_by_box_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2224,10 +2274,8 @@ struct redisCommandArg GEOSEARCHSTORE_count_Subargs[] = {
|
||||||
struct redisCommandArg GEOSEARCHSTORE_Args[] = {
|
struct redisCommandArg GEOSEARCHSTORE_Args[] = {
|
||||||
{"destination",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"destination",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"source",ARG_TYPE_KEY,1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"source",ARG_TYPE_KEY,1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"member",ARG_TYPE_STRING,-1,"FROMMEMBER",NULL,NULL,CMD_ARG_OPTIONAL},
|
{"from",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_from_Subargs},
|
||||||
{"longitude_latitude",ARG_TYPE_BLOCK,-1,"FROMLONLAT",NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_longitude_latitude_Subargs},
|
{"by",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_NONE,.subargs=GEOSEARCHSTORE_by_Subargs},
|
||||||
{"circle",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_circle_Subargs},
|
|
||||||
{"box",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_box_Subargs},
|
|
||||||
{"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_order_Subargs},
|
{"order",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_order_Subargs},
|
||||||
{"count",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_count_Subargs},
|
{"count",ARG_TYPE_BLOCK,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=GEOSEARCHSTORE_count_Subargs},
|
||||||
{"storedist",ARG_TYPE_PURE_TOKEN,-1,"STOREDIST",NULL,NULL,CMD_ARG_OPTIONAL},
|
{"storedist",ARG_TYPE_PURE_TOKEN,-1,"STOREDIST",NULL,NULL,CMD_ARG_OPTIONAL},
|
||||||
|
@ -4790,7 +4838,7 @@ struct redisCommandArg MODULE_LOADEX_args_Subargs[] = {
|
||||||
/* MODULE LOADEX argument table */
|
/* MODULE LOADEX argument table */
|
||||||
struct redisCommandArg MODULE_LOADEX_Args[] = {
|
struct redisCommandArg MODULE_LOADEX_Args[] = {
|
||||||
{"path",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"path",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"configs",ARG_TYPE_BLOCK,-1,"CONFIG",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE,.subargs=MODULE_LOADEX_configs_Subargs},
|
{"configs",ARG_TYPE_BLOCK,-1,"CONFIG",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE|CMD_ARG_MULTIPLE_TOKEN,.subargs=MODULE_LOADEX_configs_Subargs},
|
||||||
{"args",ARG_TYPE_BLOCK,-1,"ARGS",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE,.subargs=MODULE_LOADEX_args_Subargs},
|
{"args",ARG_TYPE_BLOCK,-1,"ARGS",NULL,NULL,CMD_ARG_OPTIONAL|CMD_ARG_MULTIPLE,.subargs=MODULE_LOADEX_args_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
@ -6919,6 +6967,13 @@ commandHistory SET_History[] = {
|
||||||
/* SET tips */
|
/* SET tips */
|
||||||
#define SET_tips NULL
|
#define SET_tips NULL
|
||||||
|
|
||||||
|
/* SET condition argument table */
|
||||||
|
struct redisCommandArg SET_condition_Subargs[] = {
|
||||||
|
{"nx",ARG_TYPE_PURE_TOKEN,-1,"NX",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{"xx",ARG_TYPE_PURE_TOKEN,-1,"XX",NULL,NULL,CMD_ARG_NONE},
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
|
||||||
/* SET expiration argument table */
|
/* SET expiration argument table */
|
||||||
struct redisCommandArg SET_expiration_Subargs[] = {
|
struct redisCommandArg SET_expiration_Subargs[] = {
|
||||||
{"seconds",ARG_TYPE_INTEGER,-1,"EX",NULL,"2.6.12",CMD_ARG_NONE},
|
{"seconds",ARG_TYPE_INTEGER,-1,"EX",NULL,"2.6.12",CMD_ARG_NONE},
|
||||||
|
@ -6929,20 +6984,13 @@ struct redisCommandArg SET_expiration_Subargs[] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* SET condition argument table */
|
|
||||||
struct redisCommandArg SET_condition_Subargs[] = {
|
|
||||||
{"nx",ARG_TYPE_PURE_TOKEN,-1,"NX",NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{"xx",ARG_TYPE_PURE_TOKEN,-1,"XX",NULL,NULL,CMD_ARG_NONE},
|
|
||||||
{0}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* SET argument table */
|
/* SET argument table */
|
||||||
struct redisCommandArg SET_Args[] = {
|
struct redisCommandArg SET_Args[] = {
|
||||||
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"key",ARG_TYPE_KEY,0,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"value",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
{"value",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE},
|
||||||
{"expiration",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SET_expiration_Subargs},
|
|
||||||
{"condition",ARG_TYPE_ONEOF,-1,NULL,NULL,"2.6.12",CMD_ARG_OPTIONAL,.subargs=SET_condition_Subargs},
|
{"condition",ARG_TYPE_ONEOF,-1,NULL,NULL,"2.6.12",CMD_ARG_OPTIONAL,.subargs=SET_condition_Subargs},
|
||||||
{"get",ARG_TYPE_PURE_TOKEN,-1,"GET",NULL,"6.2.0",CMD_ARG_OPTIONAL},
|
{"get",ARG_TYPE_PURE_TOKEN,-1,"GET",NULL,"6.2.0",CMD_ARG_OPTIONAL},
|
||||||
|
{"expiration",ARG_TYPE_ONEOF,-1,NULL,NULL,NULL,CMD_ARG_OPTIONAL,.subargs=SET_expiration_Subargs},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,84 +44,100 @@
|
||||||
"key_spec_index": 0
|
"key_spec_index": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token": "GET",
|
"name": "operation",
|
||||||
"name": "encoding_offset",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"name": "encoding",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "offset",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "SET",
|
|
||||||
"name": "encoding_offset_value",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"name": "encoding",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "offset",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "value",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "INCRBY",
|
|
||||||
"name": "encoding_offset_increment",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"name": "encoding",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "offset",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "increment",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "OVERFLOW",
|
|
||||||
"name": "wrap_sat_fail",
|
|
||||||
"type": "oneof",
|
"type": "oneof",
|
||||||
"optional": true,
|
"multiple": "true",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "wrap",
|
"token": "GET",
|
||||||
"type": "pure-token",
|
"name": "encoding_offset",
|
||||||
"token": "WRAP"
|
"type": "block",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "encoding",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "offset",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sat",
|
"name": "write",
|
||||||
"type": "pure-token",
|
"type": "block",
|
||||||
"token": "SAT"
|
"arguments": [
|
||||||
},
|
{
|
||||||
{
|
"token": "OVERFLOW",
|
||||||
"name": "fail",
|
"name": "wrap_sat_fail",
|
||||||
"type": "pure-token",
|
"type": "oneof",
|
||||||
"token": "FAIL"
|
"optional": true,
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "wrap",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "WRAP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sat",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "SAT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fail",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "FAIL"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "write_operation",
|
||||||
|
"type": "oneof",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"token": "SET",
|
||||||
|
"name": "encoding_offset_value",
|
||||||
|
"type": "block",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "encoding",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "offset",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"token": "INCRBY",
|
||||||
|
"name": "encoding_offset_increment",
|
||||||
|
"type": "block",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "encoding",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "offset",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "increment",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -43,6 +43,7 @@
|
||||||
"token": "GET",
|
"token": "GET",
|
||||||
"name": "encoding_offset",
|
"name": "encoding_offset",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
|
"multiple": "true",
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "encoding",
|
"name": "encoding",
|
||||||
|
|
|
@ -39,102 +39,110 @@
|
||||||
"key_spec_index": 0
|
"key_spec_index": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token": "FROMMEMBER",
|
"name": "from",
|
||||||
"name": "member",
|
"type": "oneof",
|
||||||
"type": "string",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "FROMLONLAT",
|
|
||||||
"name": "longitude_latitude",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "longitude",
|
"token": "FROMMEMBER",
|
||||||
"type": "double"
|
"name": "member",
|
||||||
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "latitude",
|
"token": "FROMLONLAT",
|
||||||
"type": "double"
|
"name": "longitude_latitude",
|
||||||
}
|
"type": "block",
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "circle",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"token": "BYRADIUS",
|
|
||||||
"name": "radius",
|
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "unit",
|
|
||||||
"type": "oneof",
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "m",
|
"name": "longitude",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "m"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "km",
|
"name": "latitude",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "km"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ft",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "ft"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mi",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "mi"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "box",
|
"name": "by",
|
||||||
"type": "block",
|
"type": "oneof",
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"token": "BYBOX",
|
"name": "circle",
|
||||||
"name": "width",
|
"type": "block",
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "height",
|
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "unit",
|
|
||||||
"type": "oneof",
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "m",
|
"token": "BYRADIUS",
|
||||||
"type": "pure-token",
|
"name": "radius",
|
||||||
"token": "m"
|
"type": "double"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "km",
|
"name": "unit",
|
||||||
"type": "pure-token",
|
"type": "oneof",
|
||||||
"token": "km"
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "m",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "km",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "km"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ft",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "ft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mi",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "mi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "box",
|
||||||
|
"type": "block",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"token": "BYBOX",
|
||||||
|
"name": "width",
|
||||||
|
"type": "double"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ft",
|
"name": "height",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "ft"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mi",
|
"name": "unit",
|
||||||
"type": "pure-token",
|
"type": "oneof",
|
||||||
"token": "mi"
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "m",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "km",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "km"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ft",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "ft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mi",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "mi"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -195,4 +203,4 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -63,102 +63,110 @@
|
||||||
"key_spec_index": 1
|
"key_spec_index": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token": "FROMMEMBER",
|
"name": "from",
|
||||||
"name": "member",
|
"type": "oneof",
|
||||||
"type": "string",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "FROMLONLAT",
|
|
||||||
"name": "longitude_latitude",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "longitude",
|
"token": "FROMMEMBER",
|
||||||
"type": "double"
|
"name": "member",
|
||||||
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "latitude",
|
"token": "FROMLONLAT",
|
||||||
"type": "double"
|
"name": "longitude_latitude",
|
||||||
}
|
"type": "block",
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "circle",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"token": "BYRADIUS",
|
|
||||||
"name": "radius",
|
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "unit",
|
|
||||||
"type": "oneof",
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "m",
|
"name": "longitude",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "m"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "km",
|
"name": "latitude",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "km"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ft",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "ft"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mi",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "mi"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "box",
|
"name": "by",
|
||||||
"type": "block",
|
"type": "oneof",
|
||||||
"optional": true,
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"token": "BYBOX",
|
"name": "circle",
|
||||||
"name": "width",
|
"type": "block",
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "height",
|
|
||||||
"type": "double"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "unit",
|
|
||||||
"type": "oneof",
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "m",
|
"token": "BYRADIUS",
|
||||||
"type": "pure-token",
|
"name": "radius",
|
||||||
"token": "m"
|
"type": "double"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "km",
|
"name": "unit",
|
||||||
"type": "pure-token",
|
"type": "oneof",
|
||||||
"token": "km"
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "m",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "km",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "km"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ft",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "ft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mi",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "mi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "box",
|
||||||
|
"type": "block",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"token": "BYBOX",
|
||||||
|
"name": "width",
|
||||||
|
"type": "double"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ft",
|
"name": "height",
|
||||||
"type": "pure-token",
|
"type": "double"
|
||||||
"token": "ft"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mi",
|
"name": "unit",
|
||||||
"type": "pure-token",
|
"type": "oneof",
|
||||||
"token": "mi"
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "m",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "m"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "km",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "km"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ft",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "ft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mi",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "mi"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -207,4 +215,4 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -125,27 +125,33 @@
|
||||||
"since": "3.0.0"
|
"since": "3.0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token": "AUTH",
|
"name": "authentication",
|
||||||
"name": "password",
|
"type": "oneof",
|
||||||
"type": "string",
|
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"since": "4.0.7"
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"token": "AUTH2",
|
|
||||||
"name": "username_password",
|
|
||||||
"type": "block",
|
|
||||||
"optional": true,
|
|
||||||
"since": "6.0.0",
|
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
"name": "username",
|
"token": "AUTH",
|
||||||
"type": "string"
|
"name": "password",
|
||||||
|
"type": "string",
|
||||||
|
"optional": true,
|
||||||
|
"since": "4.0.7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "password",
|
"token": "AUTH2",
|
||||||
"type": "string"
|
"name": "username_password",
|
||||||
|
"type": "block",
|
||||||
|
"optional": true,
|
||||||
|
"since": "6.0.0",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "username",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "password",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -160,4 +166,4 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@
|
||||||
"token": "CONFIG",
|
"token": "CONFIG",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
|
"multiple_token": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"arguments": [
|
"arguments": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,31 @@
|
||||||
"name": "value",
|
"name": "value",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "condition",
|
||||||
|
"type": "oneof",
|
||||||
|
"optional": true,
|
||||||
|
"since": "2.6.12",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"name": "nx",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "NX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "xx",
|
||||||
|
"type": "pure-token",
|
||||||
|
"token": "XX"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "get",
|
||||||
|
"token": "GET",
|
||||||
|
"type": "pure-token",
|
||||||
|
"optional": true,
|
||||||
|
"since": "6.2.0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "expiration",
|
"name": "expiration",
|
||||||
"type": "oneof",
|
"type": "oneof",
|
||||||
|
@ -101,31 +126,6 @@
|
||||||
"since": "6.0.0"
|
"since": "6.0.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "condition",
|
|
||||||
"type": "oneof",
|
|
||||||
"optional": true,
|
|
||||||
"since": "2.6.12",
|
|
||||||
"arguments": [
|
|
||||||
{
|
|
||||||
"name": "nx",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "NX"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "xx",
|
|
||||||
"type": "pure-token",
|
|
||||||
"token": "XX"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "get",
|
|
||||||
"token": "GET",
|
|
||||||
"type": "pure-token",
|
|
||||||
"optional": true,
|
|
||||||
"since": "6.2.0"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
14
src/help.h
14
src/help.h
|
@ -1,4 +1,4 @@
|
||||||
/* Automatically generated by utils/generate-command-help.rb, do not edit. */
|
/* Automatically generated by ./generate-command-help.rb, do not edit. */
|
||||||
|
|
||||||
#ifndef __REDIS_HELP_H
|
#ifndef __REDIS_HELP_H
|
||||||
#define __REDIS_HELP_H
|
#define __REDIS_HELP_H
|
||||||
|
@ -130,12 +130,12 @@ struct commandHelp {
|
||||||
15,
|
15,
|
||||||
"2.6.0" },
|
"2.6.0" },
|
||||||
{ "BITFIELD",
|
{ "BITFIELD",
|
||||||
"key [GET encoding offset] [SET encoding offset value] [INCRBY encoding offset increment] [OVERFLOW WRAP|SAT|FAIL]",
|
"key GET encoding offset|[OVERFLOW WRAP|SAT|FAIL] SET encoding offset value|INCRBY encoding offset increment [GET encoding offset|[OVERFLOW WRAP|SAT|FAIL] SET encoding offset value|INCRBY encoding offset increment ...]",
|
||||||
"Perform arbitrary bitfield integer operations on strings",
|
"Perform arbitrary bitfield integer operations on strings",
|
||||||
15,
|
15,
|
||||||
"3.2.0" },
|
"3.2.0" },
|
||||||
{ "BITFIELD_RO",
|
{ "BITFIELD_RO",
|
||||||
"key GET encoding offset",
|
"key GET encoding offset [encoding offset ...]",
|
||||||
"Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELD",
|
"Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELD",
|
||||||
15,
|
15,
|
||||||
"6.2.0" },
|
"6.2.0" },
|
||||||
|
@ -690,12 +690,12 @@ struct commandHelp {
|
||||||
13,
|
13,
|
||||||
"3.2.10" },
|
"3.2.10" },
|
||||||
{ "GEOSEARCH",
|
{ "GEOSEARCH",
|
||||||
"key [FROMMEMBER member] [FROMLONLAT longitude latitude] [BYRADIUS radius M|KM|FT|MI] [BYBOX width height M|KM|FT|MI] [ASC|DESC] [COUNT count [ANY]] [WITHCOORD] [WITHDIST] [WITHHASH]",
|
"key FROMMEMBER member|FROMLONLAT longitude latitude BYRADIUS radius M|KM|FT|MI|BYBOX width height M|KM|FT|MI [ASC|DESC] [COUNT count [ANY]] [WITHCOORD] [WITHDIST] [WITHHASH]",
|
||||||
"Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.",
|
"Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.",
|
||||||
13,
|
13,
|
||||||
"6.2.0" },
|
"6.2.0" },
|
||||||
{ "GEOSEARCHSTORE",
|
{ "GEOSEARCHSTORE",
|
||||||
"destination source [FROMMEMBER member] [FROMLONLAT longitude latitude] [BYRADIUS radius M|KM|FT|MI] [BYBOX width height M|KM|FT|MI] [ASC|DESC] [COUNT count [ANY]] [STOREDIST]",
|
"destination source FROMMEMBER member|FROMLONLAT longitude latitude BYRADIUS radius M|KM|FT|MI|BYBOX width height M|KM|FT|MI [ASC|DESC] [COUNT count [ANY]] [STOREDIST]",
|
||||||
"Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key.",
|
"Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key.",
|
||||||
13,
|
13,
|
||||||
"6.2.0" },
|
"6.2.0" },
|
||||||
|
@ -1000,7 +1000,7 @@ struct commandHelp {
|
||||||
1,
|
1,
|
||||||
"1.0.0" },
|
"1.0.0" },
|
||||||
{ "MIGRATE",
|
{ "MIGRATE",
|
||||||
"host port key| destination-db timeout [COPY] [REPLACE] [AUTH password] [AUTH2 username password] [KEYS key [key ...]]",
|
"host port key| destination-db timeout [COPY] [REPLACE] [[AUTH password]|[AUTH2 username password]] [KEYS key [key ...]]",
|
||||||
"Atomically transfer a key from a Redis instance to another one.",
|
"Atomically transfer a key from a Redis instance to another one.",
|
||||||
0,
|
0,
|
||||||
"2.6.0" },
|
"2.6.0" },
|
||||||
|
@ -1355,7 +1355,7 @@ struct commandHelp {
|
||||||
8,
|
8,
|
||||||
"1.0.0" },
|
"1.0.0" },
|
||||||
{ "SET",
|
{ "SET",
|
||||||
"key value [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|KEEPTTL] [NX|XX] [GET]",
|
"key value [NX|XX] [GET] [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|KEEPTTL]",
|
||||||
"Set the string value of a key",
|
"Set the string value of a key",
|
||||||
1,
|
1,
|
||||||
"1.0.0" },
|
"1.0.0" },
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby -w
|
||||||
|
# Usage: generate-command-help.r [path/to/commands.json]
|
||||||
|
# or: generate-commands-json.py | generate-command-help.rb -
|
||||||
|
#
|
||||||
|
# Defaults to downloading commands.json from the redis-doc repo if not provided
|
||||||
|
# or STDINed.
|
||||||
|
|
||||||
GROUPS = [
|
GROUPS = [
|
||||||
"generic",
|
"generic",
|
||||||
|
@ -66,16 +71,27 @@ def commands
|
||||||
require "net/https"
|
require "net/https"
|
||||||
require "json"
|
require "json"
|
||||||
require "uri"
|
require "uri"
|
||||||
|
if ARGV.length > 0
|
||||||
url = URI.parse "https://raw.githubusercontent.com/redis/redis-doc/master/commands.json"
|
if ARGV[0] == '-'
|
||||||
client = Net::HTTP.new url.host, url.port
|
data = STDIN.read
|
||||||
client.use_ssl = true
|
elsif FileTest.exist? ARGV[0]
|
||||||
response = client.get url.path
|
data = File.read(ARGV[0])
|
||||||
if response.is_a?(Net::HTTPSuccess)
|
else
|
||||||
@commands = JSON.parse(response.body)
|
raise Exception.new "File not found: #{ARGV[0]}"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
response.error!
|
url = URI.parse "https://raw.githubusercontent.com/redis/redis-doc/master/commands.json"
|
||||||
|
client = Net::HTTP.new url.host, url.port
|
||||||
|
client.use_ssl = true
|
||||||
|
response = client.get url.path
|
||||||
|
if !response.is_a?(Net::HTTPSuccess)
|
||||||
|
response.error!
|
||||||
|
return
|
||||||
|
else
|
||||||
|
data = response.body
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@commands = JSON.parse(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_groups
|
def generate_groups
|
||||||
|
|
Loading…
Reference in New Issue