redis-cli help.h updated. Script to generate it updated as well.

This commit is contained in:
antirez 2012-04-03 15:29:47 +02:00
parent 15113dcd3d
commit 1ad4d50805
2 changed files with 236 additions and 149 deletions

View File

@ -1,4 +1,4 @@
/* Automatically generated by generate-command-help.rb, do not edit. */ /* Automatically generated by utils/generate-command-help.rb, do not edit. */
#ifndef __REDIS_HELP_H #ifndef __REDIS_HELP_H
#define __REDIS_HELP_H #define __REDIS_HELP_H
@ -13,7 +13,8 @@ static char *commandGroups[] = {
"pubsub", "pubsub",
"transactions", "transactions",
"connection", "connection",
"server" "server",
"scripting"
}; };
struct commandHelp { struct commandHelp {
@ -27,612 +28,697 @@ struct commandHelp {
"key value", "key value",
"Append a value to a key", "Append a value to a key",
1, 1,
"1.3.3" }, "2.0.0" },
{ "AUTH", { "AUTH",
"password", "password",
"Authenticate to the server", "Authenticate to the server",
8, 8,
"0.08" }, "1.0.0" },
{ "BGREWRITEAOF", { "BGREWRITEAOF",
"-", "-",
"Asynchronously rewrite the append-only file", "Asynchronously rewrite the append-only file",
9, 9,
"1.07" }, "1.0.0" },
{ "BGSAVE", { "BGSAVE",
"-", "-",
"Asynchronously save the dataset to disk", "Asynchronously save the dataset to disk",
9, 9,
"0.07" }, "1.0.0" },
{ "BLPOP", { "BLPOP",
"key [key ...] timeout", "key [key ...] timeout",
"Remove and get the first element in a list, or block until one is available", "Remove and get the first element in a list, or block until one is available",
2, 2,
"1.3.1" }, "2.0.0" },
{ "BRPOP", { "BRPOP",
"key [key ...] timeout", "key [key ...] timeout",
"Remove and get the last element in a list, or block until one is available", "Remove and get the last element in a list, or block until one is available",
2, 2,
"1.3.1" }, "2.0.0" },
{ "BRPOPLPUSH", { "BRPOPLPUSH",
"source destination timeout", "source destination timeout",
"Pop a value from a list, push it to another list and return it; or block until one is available", "Pop a value from a list, push it to another list and return it; or block until one is available",
2, 2,
"2.1.7" }, "2.2.0" },
{ "CONFIG GET", { "CONFIG GET",
"parameter", "parameter",
"Get the value of a configuration parameter", "Get the value of a configuration parameter",
9, 9,
"2.0" }, "2.0.0" },
{ "CONFIG RESETSTAT", { "CONFIG RESETSTAT",
"-", "-",
"Reset the stats returned by INFO", "Reset the stats returned by INFO",
9, 9,
"2.0" }, "2.0.0" },
{ "CONFIG SET", { "CONFIG SET",
"parameter value", "parameter value",
"Set a configuration parameter to the given value", "Set a configuration parameter to the given value",
9, 9,
"2.0" }, "2.0.0" },
{ "DBSIZE", { "DBSIZE",
"-", "-",
"Return the number of keys in the selected database", "Return the number of keys in the selected database",
9, 9,
"0.07" }, "1.0.0" },
{ "DEBUG OBJECT", { "DEBUG OBJECT",
"key", "key",
"Get debugging information about a key", "Get debugging information about a key",
9, 9,
"0.101" }, "1.0.0" },
{ "DEBUG SEGFAULT", { "DEBUG SEGFAULT",
"-", "-",
"Make the server crash", "Make the server crash",
9, 9,
"0.101" }, "1.0.0" },
{ "DECR", { "DECR",
"key", "key",
"Decrement the integer value of a key by one", "Decrement the integer value of a key by one",
1, 1,
"0.07" }, "1.0.0" },
{ "DECRBY", { "DECRBY",
"key decrement", "key decrement",
"Decrement the integer value of a key by the given number", "Decrement the integer value of a key by the given number",
1, 1,
"0.07" }, "1.0.0" },
{ "DEL", { "DEL",
"key [key ...]", "key [key ...]",
"Delete a key", "Delete a key",
0, 0,
"0.07" }, "1.0.0" },
{ "DISCARD", { "DISCARD",
"-", "-",
"Discard all commands issued after MULTI", "Discard all commands issued after MULTI",
7, 7,
"1.3.3" }, "2.0.0" },
{ "DUMP",
"key",
"Return a serialized verison of the value stored at the specified key.",
0,
"2.6.0" },
{ "ECHO", { "ECHO",
"message", "message",
"Echo the given string", "Echo the given string",
8, 8,
"0.07" }, "1.0.0" },
{ "EVAL",
"script numkeys key [key ...] arg [arg ...]",
"Execute a Lua script server side",
10,
"2.6.0" },
{ "EXEC", { "EXEC",
"-", "-",
"Execute all commands issued after MULTI", "Execute all commands issued after MULTI",
7, 7,
"1.1.95" }, "1.2.0" },
{ "EXISTS", { "EXISTS",
"key", "key",
"Determine if a key exists", "Determine if a key exists",
9, 0,
"0.07" }, "1.0.0" },
{ "EXPIRE", { "EXPIRE",
"key seconds", "key seconds",
"Set a key's time to live in seconds", "Set a key's time to live in seconds",
0, 0,
"0.09" }, "1.0.0" },
{ "EXPIREAT", { "EXPIREAT",
"key timestamp", "key timestamp",
"Set the expiration for a key as a UNIX timestamp", "Set the expiration for a key as a UNIX timestamp",
0, 0,
"1.1" }, "1.2.0" },
{ "FLUSHALL", { "FLUSHALL",
"-", "-",
"Remove all keys from all databases", "Remove all keys from all databases",
9, 9,
"0.07" }, "1.0.0" },
{ "FLUSHDB", { "FLUSHDB",
"-", "-",
"Remove all keys from the current database", "Remove all keys from the current database",
9, 9,
"0.07" }, "1.0.0" },
{ "GET", { "GET",
"key", "key",
"Get the value of a key", "Get the value of a key",
1, 1,
"0.07" }, "1.0.0" },
{ "GETBIT", { "GETBIT",
"key offset", "key offset",
"Returns the bit value at offset in the string value stored at key", "Returns the bit value at offset in the string value stored at key",
1, 1,
"2.1.8" }, "2.2.0" },
{ "GETRANGE",
"key start end",
"Get a substring of the string stored at a key",
1,
"2.4.0" },
{ "GETSET", { "GETSET",
"key value", "key value",
"Set the string value of a key and return its old value", "Set the string value of a key and return its old value",
1, 1,
"0.091" }, "1.0.0" },
{ "HDEL", { "HDEL",
"key field", "key field [field ...]",
"Delete a hash field", "Delete one or more hash fields",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HEXISTS", { "HEXISTS",
"key field", "key field",
"Determine if a hash field exists", "Determine if a hash field exists",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HGET", { "HGET",
"key field", "key field",
"Get the value of a hash field", "Get the value of a hash field",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HGETALL", { "HGETALL",
"key", "key",
"Get all the fields and values in a hash", "Get all the fields and values in a hash",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HINCRBY", { "HINCRBY",
"key field increment", "key field increment",
"Increment the integer value of a hash field by the given number", "Increment the integer value of a hash field by the given number",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HINCRBYFLOAT",
"key field increment",
"Increment the float value of a hash field by the given amount",
5,
"2.6.0" },
{ "HKEYS", { "HKEYS",
"key", "key",
"Get all the fields in a hash", "Get all the fields in a hash",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HLEN", { "HLEN",
"key", "key",
"Get the number of fields in a hash", "Get the number of fields in a hash",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HMGET", { "HMGET",
"key field [field ...]", "key field [field ...]",
"Get the values of all the given hash fields", "Get the values of all the given hash fields",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HMSET", { "HMSET",
"key field value [field value ...]", "key field value [field value ...]",
"Set multiple hash fields to multiple values", "Set multiple hash fields to multiple values",
5, 5,
"1.3.8" }, "2.0.0" },
{ "HSET", { "HSET",
"key field value", "key field value",
"Set the string value of a hash field", "Set the string value of a hash field",
5, 5,
"1.3.10" }, "2.0.0" },
{ "HSETNX", { "HSETNX",
"key field value", "key field value",
"Set the value of a hash field, only if the field does not exist", "Set the value of a hash field, only if the field does not exist",
5, 5,
"1.3.8" }, "2.0.0" },
{ "HVALS", { "HVALS",
"key", "key",
"Get all the values in a hash", "Get all the values in a hash",
5, 5,
"1.3.10" }, "2.0.0" },
{ "INCR", { "INCR",
"key", "key",
"Increment the integer value of a key by one", "Increment the integer value of a key by one",
1, 1,
"0.07" }, "1.0.0" },
{ "INCRBY", { "INCRBY",
"key increment", "key increment",
"Increment the integer value of a key by the given number", "Increment the integer value of a key by the given amount",
1, 1,
"0.07" }, "1.0.0" },
{ "INCRBYFLOAT",
"key increment",
"Increment the float value of a key by the given amount",
1,
"2.6.0" },
{ "INFO", { "INFO",
"-", "-",
"Get information and statistics about the server", "Get information and statistics about the server",
9, 9,
"0.07" }, "1.0.0" },
{ "KEYS", { "KEYS",
"pattern", "pattern",
"Find all keys matching the given pattern", "Find all keys matching the given pattern",
0, 0,
"0.07" }, "1.0.0" },
{ "LASTSAVE", { "LASTSAVE",
"-", "-",
"Get the UNIX time stamp of the last successful save to disk", "Get the UNIX time stamp of the last successful save to disk",
9, 9,
"0.07" }, "1.0.0" },
{ "LINDEX", { "LINDEX",
"key index", "key index",
"Get an element from a list by its index", "Get an element from a list by its index",
2, 2,
"0.07" }, "1.0.0" },
{ "LINSERT", { "LINSERT",
"key BEFORE|AFTER pivot value", "key BEFORE|AFTER pivot value",
"Insert an element before or after another element in a list", "Insert an element before or after another element in a list",
2, 2,
"2.1.1" }, "2.2.0" },
{ "LLEN", { "LLEN",
"key", "key",
"Get the length of a list", "Get the length of a list",
2, 2,
"0.07" }, "1.0.0" },
{ "LPOP", { "LPOP",
"key", "key",
"Remove and get the first element in a list", "Remove and get the first element in a list",
2, 2,
"0.07" }, "1.0.0" },
{ "LPUSH", { "LPUSH",
"key value", "key value [value ...]",
"Prepend a value to a list", "Prepend one or multiple values to a list",
2, 2,
"0.07" }, "1.0.0" },
{ "LPUSHX", { "LPUSHX",
"key value", "key value",
"Prepend a value to a list, only if the list exists", "Prepend a value to a list, only if the list exists",
2, 2,
"2.1.1" }, "2.2.0" },
{ "LRANGE", { "LRANGE",
"key start stop", "key start stop",
"Get a range of elements from a list", "Get a range of elements from a list",
2, 2,
"0.07" }, "1.0.0" },
{ "LREM", { "LREM",
"key count value", "key count value",
"Remove elements from a list", "Remove elements from a list",
2, 2,
"0.07" }, "1.0.0" },
{ "LSET", { "LSET",
"key index value", "key index value",
"Set the value of an element in a list by its index", "Set the value of an element in a list by its index",
2, 2,
"0.07" }, "1.0.0" },
{ "LTRIM", { "LTRIM",
"key start stop", "key start stop",
"Trim a list to the specified range", "Trim a list to the specified range",
2, 2,
"0.07" }, "1.0.0" },
{ "MGET", { "MGET",
"key [key ...]", "key [key ...]",
"Get the values of all the given keys", "Get the values of all the given keys",
1, 1,
"0.07" }, "1.0.0" },
{ "MIGRATE",
"host port key destination db timeout",
"Atomically transfer a key from a Redis instance to another one.",
0,
"2.6.0" },
{ "MONITOR", { "MONITOR",
"-", "-",
"Listen for all requests received by the server in real time", "Listen for all requests received by the server in real time",
9, 9,
"0.07" }, "1.0.0" },
{ "MOVE", { "MOVE",
"key db", "key db",
"Move a key to another database", "Move a key to another database",
0, 0,
"0.07" }, "1.0.0" },
{ "MSET", { "MSET",
"key value [key value ...]", "key value [key value ...]",
"Set multiple keys to multiple values", "Set multiple keys to multiple values",
1, 1,
"1.001" }, "1.0.1" },
{ "MSETNX", { "MSETNX",
"key value [key value ...]", "key value [key value ...]",
"Set multiple keys to multiple values, only if none of the keys exist", "Set multiple keys to multiple values, only if none of the keys exist",
1, 1,
"1.001" }, "1.0.1" },
{ "MULTI", { "MULTI",
"-", "-",
"Mark the start of a transaction block", "Mark the start of a transaction block",
7, 7,
"1.1.95" }, "1.2.0" },
{ "OBJECT",
"subcommand [arguments [arguments ...]]",
"Inspect the internals of Redis objects",
0,
"2.2.3" },
{ "PERSIST", { "PERSIST",
"key", "key",
"Remove the expiration from a key", "Remove the expiration from a key",
0, 0,
"2.1.2" }, "2.2.0" },
{ "PEXPIRE",
"key milliseconds",
"Set a key's time to live in milliseconds",
0,
"2.6.0" },
{ "PEXPIREAT",
"key milliseconds timestamp",
"Set the expiration for a key as a UNIX timestamp specified in milliseconds",
0,
"2.6.0" },
{ "PING", { "PING",
"-", "-",
"Ping the server", "Ping the server",
8, 8,
"0.07" }, "1.0.0" },
{ "PSETEX",
"key milliseconds value",
"Set the value and expiration in milliseconds of a key",
1,
"2.6.0" },
{ "PSUBSCRIBE", { "PSUBSCRIBE",
"pattern", "pattern [pattern ...]",
"Listen for messages published to channels matching the given patterns", "Listen for messages published to channels matching the given patterns",
6, 6,
"1.3.8" }, "2.0.0" },
{ "PTTL",
"key",
"Get the time to live for a key in milliseconds",
0,
"2.6.0" },
{ "PUBLISH", { "PUBLISH",
"channel message", "channel message",
"Post a message to a channel", "Post a message to a channel",
6, 6,
"1.3.8" }, "2.0.0" },
{ "PUNSUBSCRIBE", { "PUNSUBSCRIBE",
"[pattern [pattern ...]]", "[pattern [pattern ...]]",
"Stop listening for messages posted to channels matching the given patterns", "Stop listening for messages posted to channels matching the given patterns",
6, 6,
"1.3.8" }, "2.0.0" },
{ "QUIT", { "QUIT",
"-", "-",
"Close the connection", "Close the connection",
8, 8,
"0.07" }, "1.0.0" },
{ "RANDOMKEY", { "RANDOMKEY",
"-", "-",
"Return a random key from the keyspace", "Return a random key from the keyspace",
0, 0,
"0.07" }, "1.0.0" },
{ "RENAME", { "RENAME",
"key newkey", "key newkey",
"Rename a key", "Rename a key",
0, 0,
"0.07" }, "1.0.0" },
{ "RENAMENX", { "RENAMENX",
"key newkey", "key newkey",
"Rename a key, only if the new key does not exist", "Rename a key, only if the new key does not exist",
0, 0,
"0.07" }, "1.0.0" },
{ "RESTORE",
"key ttl serialized value",
"Create a key using the provided serialized value, previously obtained using DUMP.",
0,
"2.6.0" },
{ "RPOP", { "RPOP",
"key", "key",
"Remove and get the last element in a list", "Remove and get the last element in a list",
2, 2,
"0.07" }, "1.0.0" },
{ "RPOPLPUSH", { "RPOPLPUSH",
"source destination", "source destination",
"Remove the last element in a list, append it to another list and return it", "Remove the last element in a list, append it to another list and return it",
2, 2,
"1.1" }, "1.2.0" },
{ "RPUSH", { "RPUSH",
"key value", "key value [value ...]",
"Append a value to a list", "Append one or multiple values to a list",
2, 2,
"0.07" }, "1.0.0" },
{ "RPUSHX", { "RPUSHX",
"key value", "key value",
"Append a value to a list, only if the list exists", "Append a value to a list, only if the list exists",
2, 2,
"2.1.1" }, "2.2.0" },
{ "SADD", { "SADD",
"key member", "key member [member ...]",
"Add a member to a set", "Add one or more members to a set",
3, 3,
"0.07" }, "1.0.0" },
{ "SAVE", { "SAVE",
"-", "-",
"Synchronously save the dataset to disk", "Synchronously save the dataset to disk",
9, 9,
"0.07" }, "1.0.0" },
{ "SCARD", { "SCARD",
"key", "key",
"Get the number of members in a set", "Get the number of members in a set",
3, 3,
"0.07" }, "1.0.0" },
{ "SCRIPT EXISTS",
"script [script ...]",
"Check existence of scripts in the script cache.",
10,
"2.6.0" },
{ "SCRIPT FLUSH",
"-",
"Remove all the scripts from the script cache.",
10,
"2.6.0" },
{ "SCRIPT KILL",
"-",
"Kill the script currently in execution.",
10,
"2.6.0" },
{ "SCRIPT LOAD",
"script",
"Load the specified Lua script into the script cache.",
10,
"2.6.0" },
{ "SDIFF", { "SDIFF",
"key [key ...]", "key [key ...]",
"Subtract multiple sets", "Subtract multiple sets",
3, 3,
"0.100" }, "1.0.0" },
{ "SDIFFSTORE", { "SDIFFSTORE",
"destination key [key ...]", "destination key [key ...]",
"Subtract multiple sets and store the resulting set in a key", "Subtract multiple sets and store the resulting set in a key",
3, 3,
"0.100" }, "1.0.0" },
{ "SELECT", { "SELECT",
"index", "index",
"Change the selected database for the current connection", "Change the selected database for the current connection",
8, 8,
"0.07" }, "1.0.0" },
{ "SET", { "SET",
"key value", "key value",
"Set the string value of a key", "Set the string value of a key",
1, 1,
"0.07" }, "1.0.0" },
{ "SETBIT", { "SETBIT",
"key offset value", "key offset value",
"Sets or clears the bit at offset in the string value stored at key", "Sets or clears the bit at offset in the string value stored at key",
1, 1,
"2.1.8" }, "2.2.0" },
{ "SETEX", { "SETEX",
"key seconds value", "key seconds value",
"Set the value and expiration of a key", "Set the value and expiration of a key",
1, 1,
"1.3.10" }, "2.0.0" },
{ "SETNX", { "SETNX",
"key value", "key value",
"Set the value of a key, only if the key does not exist", "Set the value of a key, only if the key does not exist",
1, 1,
"0.07" }, "1.0.0" },
{ "SETRANGE", { "SETRANGE",
"key offset value", "key offset value",
"Overwrite part of a string at key starting at the specified offset", "Overwrite part of a string at key starting at the specified offset",
1, 1,
"2.1.8" }, "2.2.0" },
{ "SHUTDOWN", { "SHUTDOWN",
"-", "[NOSAVE] [SAVE]",
"Synchronously save the dataset to disk and then shut down the server", "Synchronously save the dataset to disk and then shut down the server",
9, 9,
"0.07" }, "1.0.0" },
{ "SINTER", { "SINTER",
"key [key ...]", "key [key ...]",
"Intersect multiple sets", "Intersect multiple sets",
3, 3,
"0.07" }, "1.0.0" },
{ "SINTERSTORE", { "SINTERSTORE",
"destination key [key ...]", "destination key [key ...]",
"Intersect multiple sets and store the resulting set in a key", "Intersect multiple sets and store the resulting set in a key",
3, 3,
"0.07" }, "1.0.0" },
{ "SISMEMBER", { "SISMEMBER",
"key member", "key member",
"Determine if a given value is a member of a set", "Determine if a given value is a member of a set",
3, 3,
"0.07" }, "1.0.0" },
{ "SLAVEOF", { "SLAVEOF",
"host port", "host port",
"Make the server a slave of another instance, or promote it as master", "Make the server a slave of another instance, or promote it as master",
9, 9,
"0.100" }, "1.0.0" },
{ "SLOWLOG",
"subcommand [argument]",
"Manages the Redis slow queries log",
9,
"2.2.12" },
{ "SMEMBERS", { "SMEMBERS",
"key", "key",
"Get all the members in a set", "Get all the members in a set",
3, 3,
"0.07" }, "1.0.0" },
{ "SMOVE", { "SMOVE",
"source destination member", "source destination member",
"Move a member from one set to another", "Move a member from one set to another",
3, 3,
"0.091" }, "1.0.0" },
{ "SORT", { "SORT",
"key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]", "key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]",
"Sort the elements in a list, set or sorted set", "Sort the elements in a list, set or sorted set",
0, 0,
"0.07" }, "1.0.0" },
{ "SPOP", { "SPOP",
"key", "key",
"Remove and return a random member from a set", "Remove and return a random member from a set",
3, 3,
"0.101" }, "1.0.0" },
{ "SRANDMEMBER", { "SRANDMEMBER",
"key", "key",
"Get a random member from a set", "Get a random member from a set",
3, 3,
"1.001" }, "1.0.0" },
{ "SREM", { "SREM",
"key member", "key member [member ...]",
"Remove a member from a set", "Remove one or more members from a set",
3, 3,
"0.07" }, "1.0.0" },
{ "STRLEN", { "STRLEN",
"key", "key",
"Get the length of the value stored in a key", "Get the length of the value stored in a key",
1, 1,
"2.1.2" }, "2.2.0" },
{ "SUBSCRIBE", { "SUBSCRIBE",
"channel", "channel [channel ...]",
"Listen for messages published to the given channels", "Listen for messages published to the given channels",
6, 6,
"1.3.8" }, "2.0.0" },
{ "SUBSTR",
"key start end",
"Get a substring of the string stored at a key",
1,
"1.3.4" },
{ "SUNION", { "SUNION",
"key [key ...]", "key [key ...]",
"Add multiple sets", "Add multiple sets",
3, 3,
"0.091" }, "1.0.0" },
{ "SUNIONSTORE", { "SUNIONSTORE",
"destination key [key ...]", "destination key [key ...]",
"Add multiple sets and store the resulting set in a key", "Add multiple sets and store the resulting set in a key",
3, 3,
"0.091" }, "1.0.0" },
{ "SYNC", { "SYNC",
"-", "-",
"Internal command used for replication", "Internal command used for replication",
9, 9,
"0.07" }, "1.0.0" },
{ "TIME",
"-",
"Return the current server time",
9,
"2.6.0" },
{ "TTL", { "TTL",
"key", "key",
"Get the time to live for a key", "Get the time to live for a key",
0, 0,
"0.100" }, "1.0.0" },
{ "TYPE", { "TYPE",
"key", "key",
"Determine the type stored at key", "Determine the type stored at key",
0, 0,
"0.07" }, "1.0.0" },
{ "UNSUBSCRIBE", { "UNSUBSCRIBE",
"[channel [channel ...]]", "[channel [channel ...]]",
"Stop listening for messages posted to the given channels", "Stop listening for messages posted to the given channels",
6, 6,
"1.3.8" }, "2.0.0" },
{ "UNWATCH", { "UNWATCH",
"-", "-",
"Forget about all watched keys", "Forget about all watched keys",
7, 7,
"2.1.0" }, "2.2.0" },
{ "WATCH", { "WATCH",
"key [key ...]", "key [key ...]",
"Watch the given keys to determine execution of the MULTI/EXEC block", "Watch the given keys to determine execution of the MULTI/EXEC block",
7, 7,
"2.1.0" }, "2.2.0" },
{ "ZADD", { "ZADD",
"key score member", "key score member [score] [member]",
"Add a member to a sorted set, or update its score if it already exists", "Add one or more members to a sorted set, or update its score if it already exists",
4, 4,
"1.1" }, "1.2.0" },
{ "ZCARD", { "ZCARD",
"key", "key",
"Get the number of members in a sorted set", "Get the number of members in a sorted set",
4, 4,
"1.1" }, "1.2.0" },
{ "ZCOUNT", { "ZCOUNT",
"key min max", "key min max",
"Count the members in a sorted set with scores within the given values", "Count the members in a sorted set with scores within the given values",
4, 4,
"1.3.3" }, "2.0.0" },
{ "ZINCRBY", { "ZINCRBY",
"key increment member", "key increment member",
"Increment the score of a member in a sorted set", "Increment the score of a member in a sorted set",
4, 4,
"1.1" }, "1.2.0" },
{ "ZINTERSTORE", { "ZINTERSTORE",
"destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]", "destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]",
"Intersect multiple sorted sets and store the resulting sorted set in a new key", "Intersect multiple sorted sets and store the resulting sorted set in a new key",
4, 4,
"1.3.10" }, "2.0.0" },
{ "ZRANGE", { "ZRANGE",
"key start stop [WITHSCORES]", "key start stop [WITHSCORES]",
"Return a range of members in a sorted set, by index", "Return a range of members in a sorted set, by index",
4, 4,
"1.1" }, "1.2.0" },
{ "ZRANGEBYSCORE", { "ZRANGEBYSCORE",
"key min max [WITHSCORES] [LIMIT offset count]", "key min max [WITHSCORES] [LIMIT offset count]",
"Return a range of members in a sorted set, by score", "Return a range of members in a sorted set, by score",
4, 4,
"1.050" }, "1.0.5" },
{ "ZRANK", { "ZRANK",
"key member", "key member",
"Determine the index of a member in a sorted set", "Determine the index of a member in a sorted set",
4, 4,
"1.3.4" }, "2.0.0" },
{ "ZREM", { "ZREM",
"key member", "key member [member ...]",
"Remove a member from a sorted set", "Remove one or more members from a sorted set",
4, 4,
"1.1" }, "1.2.0" },
{ "ZREMRANGEBYRANK", { "ZREMRANGEBYRANK",
"key start stop", "key start stop",
"Remove all members in a sorted set within the given indexes", "Remove all members in a sorted set within the given indexes",
4, 4,
"1.3.4" }, "2.0.0" },
{ "ZREMRANGEBYSCORE", { "ZREMRANGEBYSCORE",
"key min max", "key min max",
"Remove all members in a sorted set within the given scores", "Remove all members in a sorted set within the given scores",
4, 4,
"1.1" }, "1.2.0" },
{ "ZREVRANGE", { "ZREVRANGE",
"key start stop [WITHSCORES]", "key start stop [WITHSCORES]",
"Return a range of members in a sorted set, by index, with scores ordered from high to low", "Return a range of members in a sorted set, by index, with scores ordered from high to low",
4, 4,
"1.1" }, "1.2.0" },
{ "ZREVRANGEBYSCORE", { "ZREVRANGEBYSCORE",
"key max min [WITHSCORES] [LIMIT offset count]", "key max min [WITHSCORES] [LIMIT offset count]",
"Return a range of members in a sorted set, by score, with scores ordered from high to low", "Return a range of members in a sorted set, by score, with scores ordered from high to low",
4, 4,
"2.1.6" }, "2.2.0" },
{ "ZREVRANK", { "ZREVRANK",
"key member", "key member",
"Determine the index of a member in a sorted set, with scores ordered from high to low", "Determine the index of a member in a sorted set, with scores ordered from high to low",
4, 4,
"1.3.4" }, "2.0.0" },
{ "ZSCORE", { "ZSCORE",
"key member", "key member",
"Get the score associated with the given member in a sorted set", "Get the score associated with the given member in a sorted set",
4, 4,
"1.1" }, "1.2.0" },
{ "ZUNIONSTORE", { "ZUNIONSTORE",
"destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]", "destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]",
"Add multiple sorted sets and store the resulting sorted set in a new key", "Add multiple sorted sets and store the resulting sorted set in a new key",
4, 4,
"1.3.10" } "2.0.0" }
}; };
#endif #endif

View File

@ -10,7 +10,8 @@ GROUPS = [
"pubsub", "pubsub",
"transactions", "transactions",
"connection", "connection",
"server" "server",
"scripting"
].freeze ].freeze
GROUPS_BY_NAME = Hash[* GROUPS_BY_NAME = Hash[*
@ -48,7 +49,7 @@ def commands
require "json" require "json"
require "uri" require "uri"
url = URI.parse "https://github.com/antirez/redis-doc/raw/master/commands.json" url = URI.parse "https://raw.github.com/antirez/redis-doc/master/commands.json"
client = Net::HTTP.new url.host, url.port client = Net::HTTP.new url.host, url.port
client.use_ssl = true client.use_ssl = true
response = client.get url.path response = client.get url.path