diff --git a/website/docs/commands/api-compatibility.md b/website/docs/commands/api-compatibility.md index af95155613..8cc3884c38 100644 --- a/website/docs/commands/api-compatibility.md +++ b/website/docs/commands/api-compatibility.md @@ -11,23 +11,29 @@ Note that this list is subject to change as we continue to expand our API comman ### Command Categories 1. [ACL](#acl) 2. [BITMAP](#bitmap) -3. [CLUSTER](#cluster) -4. [CONNECTION](#connection) -5. [FUNCTIONS](#functions) -6. [GENERIC](#generic) -7. [GEO](#geo) -8. [HASH](#hash) -9. [HYPERLOGLOG](#hyperloglog) -10. [KEYS](#keys) -11. [LIST](#list) -12. [PUB/SUB](#pubsub) -13. [SCRIPTING](#scripting) -14. [SERVER](#server) -15. [SET](#set) -16. [SORTED SET](#sorted-set) -17. [STREAM](#stream) -18. [STRING](#string) -10. [TRANSACTIONS](#transactions) +3. [CLIENT](#client) +4. [CLUSTER](#cluster) +5. [COMMAND](#command) +6. [CONNECTION](#connection) +7. [FUNCTIONS](#functions) +8. [GENERIC](#generic) +9. [GEO](#geo) +10. [HASH](#hash) +11. [HYPERLOGLOG](#hyperloglog) +12. [KEYS](#keys) +13. [LATENCY](#latency) +14. [LIST](#list) +15. [MEMORY](#memory) +16. [MODULE](#module) +17. [OBJECT](#object) +18. [PUB/SUB](#pubsub) +19. [SCRIPTING](#scripting) +20. [SERVER](#server) +21. [SET](#set) +22. [SORTED SET](#sorted-set) +23. [STREAM](#stream) +24. [STRING](#string) +25. [TRANSACTIONS](#transactions) ### Full Commands List @@ -40,6 +46,7 @@ Note that this list is subject to change as we continue to expand our API comman | | GETUSER | ➖ | | | | [LIST](acl.md#acl-list) | ➕ | | | | [LOAD](acl.md#acl-load) | ➕ | | +| | HELP | ➖ | | | | LOG | ➖ | | | | SAVE | ➖ | | | | [SETUSER](acl.md#acl-setuser) | ➕ | | @@ -53,9 +60,27 @@ Note that this list is subject to change as we continue to expand our API comman | | [BITPOS](analytics.md#bitpos) | ➕ | | | | [GETBIT](analytics.md#getbit) | ➕ | | | | [SETBIT](analytics.md#setbit) | ➕ | | +| **CLIENT** | CACHING | ➖ | | +| | GETNAME | ➖ | | +| | GETREDIR | ➖ | | +| | HELP | ➖ | | +| | [ID](client.md#client-id) | ➕ | | +| | [INFO](client.md#client-info) | ➕ | | +| | [KILL](client.md#client-kill) | ➕ | | +| | [LIST](client.md#client-list) | ➕ | | +| | NO-EVICT | ➖ | | +| | NO-TOUCH | ➖ | | +| | PAUSE | ➖ | | +| | REPLY | ➖ | | +| | SETINFO | ➖ | | +| | SETNAME | ➖ | | +| | TRACKING | ➖ | | +| | TRACKINGINFO | ➖ | | +| | UNBLOCK | ➖ | | +| | UNPAUSE | ➖ | | | **CLUSTER** | [ADDSLOTS](cluster.md#cluster-addslots) | ➕ | | | | [ADDSLOTSRANGE](cluster.md#cluster-addslotsrange) | ➕ | | -| | ASKING | ➕ | | +| | [ASKING](cluster.md#asking) | ➕ | | | | [BUMPEPOCH](cluster.md#cluster-bumpepoch) | ➕ | | | | COUNT-FAILURE-REPORTS | ➖ | | | | [COUNTKEYSINSLOT](cluster.md#cluster-countkeysinslot) | ➕ | | @@ -65,34 +90,50 @@ Note that this list is subject to change as we continue to expand our API comman | | FLUSHSLOTS | ➖ | | | | [FORGET](cluster.md#cluster-forget) | ➕ | | | | [GETKEYINSLOT](cluster.md#cluster-getkeysinslot) | ➕ | | -| | INFO | ➕ | | +| | [INFO](cluster.md#cluster-info) | ➕ | | | | [KEYSLOT](cluster.md#cluster-keyslot) | ➕ | | | | LINKS | ➖ | | | | [MEET](cluster.md#cluster-meet) | ➕ | | | | [MYID](cluster.md#cluster-myid) | ➕ | | +| | MYSHARDID | ➖ | | | | [NODES](cluster.md#cluster-nodes) | ➕ | | -| | READONLY | ➕ | | -| | READWRITE | ➕ | | +| | [READONLY](cluster.md#readonly) | ➕ | | +| | [READWRITE](cluster.md#readwrite) | ➕ | | | | [REPLICAS](cluster.md#cluster-replicas) | ➕ | | | | [REPLICATE](cluster.md#cluster-replicate) | ➕ | | -| | RESET | ➕ | | +| | [RESET](cluster.md#reset) | ➕ | | | | SAVECONFIG | ➖ | | | | [SET-CONFIG-EPOCH](cluster.md#cluster-set-config-epoch) | ➕ | | | | [SETSLOT](cluster.md#cluster-setslot) | ➕ | | +| | SHARDS | ➖ | | | | [SLAVES](cluster.md#slaves) | ➕ | | -| | SLOTS | ➕ | | +| | [SLOTS](cluster.md#cluster-slots) | ➕ | (deprecated) | +| **COMMAND** | [COMMAND](server.md#command) | ➕ | | +| | [COUNT](server.md#command-count) | ➕ | | +| | DOCS | ➖ | | +| | GETKEYS | ➖ | | +| | GETKEYSANDFLAGS | ➖ | | +| | HELP | ➖ | | +| | [INFO](server.md#command-info) | ➕ | | +| | LIST | ➖ | | | **CONNECTION** | [AUTH](generic-commands.md#auth) | ➕ | | -| | CLIENT CACHING | ➖ | | | | [ECHO](generic-commands.md#echo) | ➕ | | | | [HELLO](generic-commands.md#hello) | ➕ | | | | [PING](generic-commands.md#ping) | ➕ | | | | [QUIT](generic-commands.md#quit) | ➕ | | -| | SELECT | ➕ | | +| | [SELECT](generic-commands.md#select) | ➕ | | | **FUNCTIONS** | FCALL | ➖ | | | | FCALL_RO | ➖ | | -| | FUNCTION | ➖ | -| **GENERIC** | OBJECT | ➖ | | -| | [PERSIST](generic-commands.md#persist) | ➕ | | +| | DELETE | ➖ | +| | DUMP | ➖ | +| | FLUSH | ➖ | +| | HELP | ➖ | +| | KILL | ➖ | +| | LIST | ➖ | +| | LOAD | ➖ | +| | RESTORE | ➖ | +| | STATS | ➖ | +| **GENERIC** | [PERSIST](generic-commands.md#persist) | ➕ | | | | [PEXPIRE](generic-commands.md#pexpire) | ➕ | | | | PEXPIREAT | ➖ | | | | PEXPIRETIME | ➖ | | @@ -109,6 +150,7 @@ Note that this list is subject to change as we continue to expand our API comman | | [TYPE](generic-commands.md#type) | ➕ | | | | [UNLINK](generic-commands.md#unlink) | ➕ | | | | WAIT | ➖ | | +| | WAITAOF | ➖ | | | **GEO** | [GEOADD](data-structures.md#geoadd) | ➕ | | | | [GEODIST](data-structures.md#geodist) | ➕ | | | | [GEOHASH](data-structures.md#geohash) | ➕ | | @@ -116,10 +158,14 @@ Note that this list is subject to change as we continue to expand our API comman | | GEORADIUS | ➖ | | | | GEORADIUS_RO | ➖ | | | | GEORADIUSBYMEMBER | ➖ | | +| | GEORADIUSBYMEMBER_RO | ➖ | | | | [GEOSEARCH](data-structures.md#geosearch) | ➕ | Partially Implemented | | | GEOSEARCHSTORE | ➖ | | | **HASH** | [HDEL](data-structures.md#hdel) | ➕ | | | | [HEXISTS](data-structures.md#hexists) | ➕ | | +| | HEXPIRE | ➖ | | +| | HEXPIREAT | ➖ | | +| | HEXPIRETIME | ➖ | | | | [HGET](data-structures.md#hget) | ➕ | | | | [HGETALL](data-structures.md#hgetall) | ➕ | | | | [HINCRBY](data-structures.md#hincrby) | ➕ | | @@ -128,11 +174,17 @@ Note that this list is subject to change as we continue to expand our API comman | | [HLEN](data-structures.md#hlen) | ➕ | | | | [HMGET](data-structures.md#hmget) | ➕ | | | | [HMSET](data-structures.md#hmset) | ➕ | | +| | HPERSIST | ➖ | | +| | HPEXPIRE | ➖ | | +| | HPEXPIREAT | ➖ | | +| | HPEXPIRETIME | ➖ | | +| | HPTTL | ➖ | | | | [HRANDFIELD](data-structures.md#hrandfield) | ➕ | | -| | [HSCAN](data-structures.md#hscan) | ➕ | | +| | [HSCAN](data-structures.md#hscan) | ➕ | `NOVALUES` flag not yet implemented | | | [HSET](data-structures.md#hset) | ➕ | | | | [HSETNX](data-structures.md#hsetnx) | ➕ | | | | [HSTRLEN](data-structures.md#hstrlen) | ➕ | | +| | HTTL | ➖ | | | | [HVALS](data-structures.md#hvals) | ➕ | | | **HYPERLOGLOG** | [PFADD](analytics.md#pfadd) | ➕ | | | | [PFCOUNT](analytics.md#pfcount) | ➕ | | @@ -149,6 +201,13 @@ Note that this list is subject to change as we continue to expand our API comman | | [KEYS](generic-commands.md#keys) | ➕ | | | | [MIGRATE](generic-commands.md#migrate) | ➕ | | | | MOVE | ➖ | | +| **LATENCY** | DOCTOR | ➖ | | +| | GRAPH | ➖ | | +| | HELP | ➖ | | +| | [HISTOGRAM](server.md#latency-histogram) | ➕ | | +| | HISTORY | ➖ | | +| | LATEST | ➖ | | +| | [RESET](server.md#latency-reset) | ➕ | | | **LIST** | [BLMOVE](data-structures.md#blmove) | ➕ | | | | BLMPOP | ➖ | | | | [BLPOP](data-structures.md#blpop) | ➕ | | @@ -171,54 +230,59 @@ Note that this list is subject to change as we continue to expand our API comman | | [RPOPLPUSH](data-structures.md#rpoplpush) | ➕ | | | | [RPUSH](data-structures.md#rpush) | ➕ | | | | [RPUSHX](data-structures.md#rpushx) | ➕ | | +| **MEMORY** | DOCTOR | ➖ | | +| | HELP | ➖ | | +| | MALLOC-STATS | ➖ | | +| | PURGE | ➖ | | +| | STATS | ➖ | | +| | [USAGE](server.md#memory-usage) | ➕ | | +| **MODULE** | HELP | ➖ | | +| | LIST | ➖ | | +| | LOAD | ➖ | | +| | LOADEX | ➖ | | +| | UNLOAD | ➖ | | +| **OBJECT** | ENCODING | ➖ | | +| | FREQ | ➖ | | +| | HELP | ➖ | | +| | IDLETIME | ➖ | | +| | REFCOUNT | ➖ | | | **PUB/SUB** | [PSUBSCRIBE](analytics.md#psubscribe) | ➕ | | | | [PUBLISH](analytics.md#publish) | ➕ | | | | PUBSUB CHANNELS | ➖ | | +| | PUBSUB HELP | ➖ | | | | PUBSUB NUMPAT | ➖ | | | | PUBSUB NUMSUB | ➖ | | +| | PUBSUB SHARDCHANNELS | ➖ | | +| | PUBSUB SHARDNUMSUB | ➖ | | | | [PUNSUBSCRIBE](analytics.md#punsubscribe) | ➕ | | | | [SUBSCRIBE](analytics.md#subscribe) | ➕ | | | | [UNSUBSCRIBE](analytics.md#unsubscribe) | ➕ | | -| **SCRIPTING** | EVAL | ➕ | | +| **SCRIPTING** | [EVAL](scripting-and-functions.md#eval) | ➕ | | | | EVAL_RO | ➖ | | -| | EVALSHA | ➕ | | +| | [EVALSHA](scripting-and-functions.md#evalsha) | ➕ | | | | EVALSHA_RO | ➖ | | | | SCRIPT DEBUG | ➖ | | -| | SCRIPT EXISTS | ➕ | | -| | SCRIPT FLUSH | ➕ | | +| | [SCRIPT EXISTS](scripting-and-functions.md#script-exists) | ➕ | | +| | [SCRIPT FLUSH](scripting-and-functions.md#script-flush) | ➕ | | +| | SCRIPT HELP | ➖ | | | | SCRIPT KILL | ➖ | | -| | SCRIPT LOAD | ➕ | | +| | [SCRIPT LOAD](scripting-and-functions.md#script-load) | ➕ | | | **SERVER** | ACL | ➖ | | | | BGREWRITEAOF | ➖ | | | | [BGSAVE](checkpoint.md#bgsave) | ➕ | | -| | [COMMAND](server.md#command) | ➕ | | -| | [COMMAND COUNT](server.md#command-count) | ➕ | | -| | COMMAND DOCS | ➖ | | -| | COMMAND GETKEYS | ➖ | | -| | COMMAND GETKEYSANDFLAGS | ➖ | | -| | [COMMAND INFO](server.md#command-info) | ➕ | | -| | COMMAND LIST | ➖ | | | | [COMMITAOF](server.md#commitaof) | ➕ | | | | [CONFIG GET](server.md#config-get) | ➕ | | +| | CONFIG HELP | ➖ | | +| | CONFIG RESETSTAT | ➖ | | +| | CONFIG REWRITE | ➖ | | | | [CONFIG SET](server.md#config-set) | ➕ | | | | [DBSIZE](server.md#dbsize) | ➕ | | +| | DEBUG | ➖ | Internal command | | | [FLUSHALL](server.md#flushall) | ➕ | | | | [FLUSHDB](server.md#flushdb) | ➕ | | | | [LASTSAVE](checkpoint.md#lastsave) | ➕ | | -| | LATENCY DOCTOR | ➖ | | -| | LATENCY GRAPH | ➖ | | -| | [LATENCY HISTOGRAM](server.md#latency-histogram) | ➕ | | -| | LATENCY HISTORY | ➖ | | -| | LATENCY LATEST | ➖ | | -| | [LATENCY RESET](server.md#latency-reset) | ➕ | | -| | LOLWUT | ➕ | | -| | MEMORY DOCTOR | ➖ | | -| | MEMORY MALLOC-STATS | ➖ | | -| | MEMORY PURGE | ➖ | | -| | MEMORY STATS | ➖ | | -| | [MEMORY USAGE](server.md#memory-usage) | ➕ | | -| | MODULE | ➖ | | -| | MONITOR | ➖ | | +| | LOLWUT | ➖ | | +| | [MONITOR](server.md#monitor) | ➕ | | | | PSYNC | ➖ | | | | REPLCONF | ➖ | | | | [REPLICAOF](server.md#replicaof) | ➕ | | @@ -227,7 +291,6 @@ Note that this list is subject to change as we continue to expand our API comman | | [SAVE](checkpoint.md#save) | ➕ | | | | SHUTDOWN | ➖ | | | | SLAVEOF | ➖ | | -| | SLOWLOG | ➖ | | | | SWAPDB | ➖ | | | | SYNC | ➖ | | | | [TIME](server.md#time) | ➕ | | @@ -238,17 +301,25 @@ Note that this list is subject to change as we continue to expand our API comman | | [SINTER](data-structures.md#sinter) | ➕ | | | | [SINTERSTORE](data-structures.md#sinterstore) | ➕ | | | | SINTERCARD | ➖ | | -| | SISMEMBER | ➕ | | +| | [SISMEMBER](data-structures.md#sismember) | ➕ | | | | [SMEMBERS](data-structures.md#smembers) | ➕ | | | | SMISMEMBER | ➖ | | | | SMOVE | ➖ | | | | [SPOP](data-structures.md#spop) | ➕ | | +| | SPUBLISH | ➖ | | | | [SRANDMEMBER](data-structures.md#srandmember) | ➕ | | | | [SREM](data-structures.md#srem) | ➕ | | | | [SSCAN](data-structures.md#sscan) | ➕ | | +| | SSUBSCRIBE | ➖ | | | | [SUNION](data-structures.md#sunion) | ➕ | | | | [SUNIONSTORE](data-structures.md#sunionstore) | ➕ | | +| | SUNSUBSCRIBE | ➖ | | +| **SLOWLOG** | GET | ➖ | | +| | HELP | ➖ | | +| | LEN | ➖ | | +| | RESET | ➖ | | | **SORTED SET** | BZPOP | ➖ | | +| | BZMPOP | ➖ | | | | BZPOPMAX | ➖ | | | | BZPOPMIN | ➖ | | | | [ZADD](data-structures.md#zadd) | ➕ | | @@ -277,7 +348,7 @@ Note that this list is subject to change as we continue to expand our API comman | | [ZREMRANGEBYSCORE](data-structures.md#zremrangebyscore) | ➕ | | | | [ZREVRANGE](data-structures.md#zrevrange) | ➕ | | | | ZREVRANGEBYLEX | ➖ | | -| | ZREVRANGEBYSCORE | ➖ | | +| | [ZREVRANGEBYSCORE](data-structures.md#zrevrangebyscore) | ➕ | | | | [ZREVRANK](data-structures.md#zrevrank) | ➕ | | | | [ZSCAN](data-structures.md#zscan) | ➕ | | | | [ZSCORE](data-structures.md#zscore) | ➕ | | @@ -288,8 +359,16 @@ Note that this list is subject to change as we continue to expand our API comman | | XAUTOCLAIM | ➖ | | | | XCLAIM | ➖ | | | | XDEL | ➖ | | -| | XGROUP | ➖ | | -| | XINFO | ➖ | | +| | XGROUP CREATE | ➖ | | +| | XGROUP CREATECONSUMER | ➖ | | +| | XGROUP DELCONSUMER | ➖ | | +| | XGROUP DESTROY | ➖ | | +| | XGROUP HELP | ➖ | | +| | XGROUP SETID | ➖ | | +| | XINFO CONSUMERS | ➖ | | +| | XINFO GROUPS | ➖ | | +| | XINFO HELP | ➖ | | +| | XINFO STREAM | ➖ | | | | XLEN | ➖ | | | | XPENDING | ➖ | | | | XRANGE | ➖ | | @@ -318,7 +397,7 @@ Note that this list is subject to change as we continue to expand our API comman | | [SET ... NX](raw-string.md#set) | ➕ | | | | [SETEX](raw-string.md#setex) | ➕ | | | | SETNX | ➖ | | -| | SETRANGE | ➕ | | +| | [SETRANGE](raw-string.md#setrange) | ➕ | | | | [STRLEN](raw-string.md#strlen) | ➕ | | | | SUBSTR | ➖ | | | **TRANSACTIONS** | [DISCARD](transactions.md#discard) | ➕ | | diff --git a/website/docs/commands/client.md b/website/docs/commands/client.md new file mode 100644 index 0000000000..37ae56621c --- /dev/null +++ b/website/docs/commands/client.md @@ -0,0 +1,93 @@ +--- +id: client-commands +sidebar_label: Client Management +title: Client Management +slug: client +--- + +### CLIENT ID + +#### Syntax + +```bash + CLIENT ID +``` + +The command just returns the ID of the current connection. Every connection ID has certain guarantees: + +1. It is never repeated, so if CLIENT ID returns the same number, the caller can be sure that the underlying client did not disconnect and reconnect the connection, but it is still the same connection. +1. The ID is monotonically incremental. If the ID of a connection is greater than the ID of another connection, it is guaranteed that the second connection was established with the server at a later time. + +#### Resp Reply + +Integer reply: the ID of the client. + +--- + +### CLIENT INFO + +#### Syntax + +```bash + CLIENT INFO +``` + +The command returns information and statistics about the current client connection in a mostly human readable format. + +#### Resp Reply + +Bulk string reply: a unique string for the current client, as described at the CLIENT LIST page. + +--- + +### CLIENT KILL + +#### Syntax + +```bash + CLIENT KILL ] | [USER username] | [ADDR ip:port] | + [LADDR ip:port] | [SKIPME ] | [MAXAGE maxage] + [[ID client-id] | [TYPE ] | [USER username] | [ADDR ip:port] | [LADDR ip:port] | + [SKIPME ] | [MAXAGE maxage] ...]>> +``` + +The CLIENT KILL command closes a given client connection. + +* CLIENT KILL addr:port. This kill the client matching the given address and port. +* CLIENT KILL ADDR ip:port. This kill the client matching the given address and port. +* CLIENT KILL LADDR ip:port. Kill all clients connected to specified local (bind) address. +* CLIENT KILL ID client-id. Allows to kill a client by its unique ID field. Client ID's are retrieved using the CLIENT LIST command. +* CLIENT KILL TYPE type, where type is one of normal, master, replica and pubsub. This closes the connections of all the clients in the specified class. Note that clients blocked into the MONITOR command are considered to belong to the normal class. +* CLIENT KILL USER username. Closes all the connections that are authenticated with the specified ACL username, however it returns an error if the username does not map to an existing ACL user. +* CLIENT KILL SKIPME yes/no. By default this option is set to yes, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command. +* CLIENT KILL MAXAGE maxage. Closes all the connections that are older than the specified age, in seconds. + +#### Resp Reply + +One of the following: + +* Simple string reply: OK when called in 3 argument format and the connection has been closed. +* Integer reply: when called in filter/value format, the number of clients killed. + +--- + +### CLIENT LIST + +#### Syntax + +```bash + CLIENT LIST [TYPE ] + [ID client-id [client-id ...]] +``` + +The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format. + +You can use one of the optional subcommands to filter the list. The TYPE type subcommand filters the list by clients' type, where type is one of normal, master, replica, and pubsub. + +#### Resp Reply + +Bulk string reply: information and statistics about client connections. + +--- \ No newline at end of file diff --git a/website/docs/commands/cluster.md b/website/docs/commands/cluster.md index 458317f051..854dd8a58e 100644 --- a/website/docs/commands/cluster.md +++ b/website/docs/commands/cluster.md @@ -248,6 +248,21 @@ An array of keys or empty. ---- +## CLUSTER INFO + +#### Syntax + +```bash + CLUSTER INFO +``` + +CLUSTER INFO provides INFO style information about Redis Cluster vital parameters. + +#### RESP Reply +Bulk string reply: A map between named fields and values in the form of : lines separated by newlines composed by the two bytes CRLF. + +---- + ## CLUSTER KEYSLOT #### Syntax @@ -611,6 +626,77 @@ Array reply: a nested list of hash ranges and node information grouped by shard. ---- +## CLUSTER SLOTS + +#### Syntax + +```bash + CLUSTER SLOTS +``` + +CLUSTER SLOTS returns details about which cluster slots map to which Redis instances. + +#### RESP Reply +Array reply: nested list of slot ranges with networking information. + +---- + +## ASKING + +#### Syntax + +```bash + ASKING +``` + +When a cluster client receives an -ASK redirect, the ASKING command is sent to the target node followed by the command which was redirected. This is normally done automatically by cluster clients. + +#### RESP Reply +Simple string reply: OK. + +---- + +## READONLY + +#### Syntax + +```bash + READONLY +``` + +Enables read queries for a connection to a Redis Cluster replica node. + +#### RESP Reply +Simple string reply: OK. + +---- + +## READWRITE +#### Syntax +```bash + READWRITE +``` +Disables read queries for a connection to a Redis Cluster replica node. + +#### RESP Reply +Simple string reply: OK. + +---- + +## RESET + +#### Syntax + +```bash + RESET +``` + +This command performs a full reset of the connection's server-side context, mimicking the effect of disconnecting and reconnecting again. + +#### RESP Reply +Simple string reply: RESET. + +---- diff --git a/website/docs/commands/data-structures.md b/website/docs/commands/data-structures.md index 922bd70a2c..c97a076b03 100644 --- a/website/docs/commands/data-structures.md +++ b/website/docs/commands/data-structures.md @@ -487,7 +487,6 @@ Returns the set cardinality (number of elements) of the set stored at **key**. Returns all the members of the set value stored at **key**. - --- ### SPOP @@ -933,6 +932,18 @@ Apart from the reversed ordering, **ZREVRANGE** is similar to [ZRANGE](#zrange). --- +### ZREVRANGEBYSCORE + +#### Syntax + +```bash + ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count] +``` + +Returns all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). + +--- + ### ZREVRANK {#zrevrank} #### Syntax diff --git a/website/docs/commands/generic-commands.md b/website/docs/commands/generic-commands.md index 8eecbfdede..61d886ac74 100644 --- a/website/docs/commands/generic-commands.md +++ b/website/docs/commands/generic-commands.md @@ -99,6 +99,22 @@ Simple string reply: OK. --- +### SELECT + +#### Syntax + +```bash + SELECT +``` + +Select the Redis logical database having the specified zero-based numeric index. New connections always use the database 0. + +#### Resp Reply + +Simple string reply: OK. + +--- + ## Generic Commands ### DEL diff --git a/website/docs/commands/raw-string.md b/website/docs/commands/raw-string.md index 15f152d616..30558ffac0 100644 --- a/website/docs/commands/raw-string.md +++ b/website/docs/commands/raw-string.md @@ -244,3 +244,21 @@ Returns the length of the string value stored at **key**. #### Resp Reply * Integer reply: the length of the string stored at key, or 0 when the key does not exist. + +--- + +### SETRANGE + +#### Syntax + +```bash + SETRANGE key offset value +``` + +Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value. + +#### Resp Reply + +* Integer reply: the length of the string after it was modified by the command. + +--- diff --git a/website/docs/commands/scripting-and-functions.md b/website/docs/commands/scripting-and-functions.md new file mode 100644 index 0000000000..b4837bbe79 --- /dev/null +++ b/website/docs/commands/scripting-and-functions.md @@ -0,0 +1,86 @@ +--- +id: scripting-commands +sidebar_label: Scripting and functions +title: Scripting and functions +slug: scripting +--- + +### EVAL + +#### Syntax + +```bash + EVAL script numkeys [key [key ...]] [arg [arg ...]] +``` + +Invoke the execution of a server-side Lua script. + +#### Resp Reply + +The return value depends on the script that was executed. + +--- + +### EVALSHA + +#### Syntax + +```bash + EVALSHA sha1 numkeys [key [key ...]] [arg [arg ...]] +``` + +Evaluate a script from the server's cache by its SHA1 digest. + +#### Resp Reply + +The return value depends on the script that was executed. + +--- + +### SCRIPT EXISTS + +#### Syntax + +```bash + SCRIPT EXISTS sha1 [sha1 ...] +``` + +Returns information about the existence of the scripts in the script cache. + +#### Resp Reply + +Array reply: an array of integers that correspond to the specified SHA1 digest arguments. + +--- + +### SCRIPT FLUSH + +#### Syntax + +```bash + SCRIPT FLUSH [ASYNC | SYNC] +``` + +Flush the Lua scripts cache. + +#### Resp Reply + +Simple string reply: OK. + +--- + +### SCRIPT LOAD + +#### Syntax + +```bash + SCRIPT LOAD script +``` + +Load a script into the scripts cache, without executing it. + +#### Resp Reply + +Bulk string reply: the SHA1 digest of the script added into the script cache. + +--- diff --git a/website/docs/commands/server.md b/website/docs/commands/server.md index 2d3a1cc867..05429771d4 100644 --- a/website/docs/commands/server.md +++ b/website/docs/commands/server.md @@ -224,4 +224,20 @@ The TIME command returns the current server time as a two items lists: a Unix ti Array reply: specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count. ---- \ No newline at end of file +--- + +### MONITOR + +#### Syntax + +```bash +MONITOR +``` + +MONITOR is a debugging command that streams back every command processed by the Redis server. It can help in understanding what is happening to the database. + +#### Resp Reply + +Non-standard return value. Dumps the received commands in an infinite flow. + +--- diff --git a/website/sidebars.js b/website/sidebars.js index 697f6586a9..ccca441189 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -20,7 +20,7 @@ const sidebars = { {type: 'category', label: 'Welcome', collapsed: false, items: ["welcome/intro", "welcome/news", "welcome/features", "welcome/releases", "welcome/compatibility", "welcome/roadmap", "welcome/faq", "welcome/about-us"]}, {type: 'category', label: 'Getting Started', items: ["getting-started/build", "getting-started/configuration", "getting-started/memory", "getting-started/security", "getting-started/compaction"]}, {type: 'category', label: 'Benchmarking', items: ["benchmarking/overview", "benchmarking/results-resp-bench", "benchmarking/resp-bench"]}, - {type: 'category', label: 'Commands', items: ["commands/overview", "commands/api-compatibility", "commands/raw-string", "commands/generic-commands", "commands/analytics-commands", "commands/data-structures", "commands/server-commands", "commands/checkpoint-commands", "commands/transactions-commands", "commands/cluster", "commands/acl-commands"]}, + {type: 'category', label: 'Commands', items: ["commands/overview", "commands/api-compatibility", "commands/raw-string", "commands/generic-commands", "commands/analytics-commands", "commands/data-structures", "commands/server-commands", "commands/client-commands", "commands/checkpoint-commands", "commands/transactions-commands", "commands/cluster", "commands/acl-commands", "commands/scripting-commands"]}, {type: 'category', label: 'Server Extensions', items: ["extensions/overview", "extensions/raw-strings", "extensions/objects", "extensions/transactions", "extensions/procedure", "extensions/module"]}, {type: 'category', label: 'Cluster Mode', items: ["cluster/overview", "cluster/replication", "cluster/key-migration"]}, {type: 'category', label: 'Developer Guide', items: ["dev/onboarding", "dev/code-structure", "dev/configuration", "dev/network", "dev/processing", "dev/garnet-api",