diff --git a/content/commands/acl-cat.md b/content/commands/acl-cat.md index 048968fac..da284030d 100644 --- a/content/commands/acl-cat.md +++ b/content/commands/acl-cat.md @@ -118,3 +118,21 @@ Then we may want to know what commands are part of a given category: 30) "psync" 31) "sort" ``` + +## Return information + +{{< multitabs id="acl-cat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given. + +{{< /multitabs >}} diff --git a/content/commands/acl-deluser.md b/content/commands/acl-deluser.md index a6f73de45..00ec9541b 100644 --- a/content/commands/acl-deluser.md +++ b/content/commands/acl-deluser.md @@ -50,3 +50,17 @@ exist, in such case no operation is performed for the non existing users. > ACL DELUSER antirez 1 ``` + +## Return information + +{{< multitabs id="acl-deluser-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist. + +{{< /multitabs >}} diff --git a/content/commands/acl-dryrun.md b/content/commands/acl-dryrun.md index 4be989e07..a9a519545 100644 --- a/content/commands/acl-dryrun.md +++ b/content/commands/acl-dryrun.md @@ -56,3 +56,21 @@ This command can be used to test the permissions of a given user without having > ACL DRYRUN VIRGINIA GET foo "User VIRGINIA has no permissions to run the 'get' command" ``` + +## Return information + +{{< multitabs id="acl-dryrun-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command. + +-tab-sep- + +Any of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command. + +{{< /multitabs >}} diff --git a/content/commands/acl-genpass.md b/content/commands/acl-genpass.md index 0c0115507..32c9e13c5 100644 --- a/content/commands/acl-genpass.md +++ b/content/commands/acl-genpass.md @@ -73,3 +73,17 @@ hex character. > ACL GENPASS 5 "90" ``` + +## Return information + +{{< multitabs id="acl-genpass-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. + +{{< /multitabs >}} diff --git a/content/commands/acl-getuser.md b/content/commands/acl-getuser.md index 77083b28f..85347cf7f 100644 --- a/content/commands/acl-getuser.md +++ b/content/commands/acl-getuser.md @@ -80,3 +80,21 @@ Here's an example configuration for a user 9) "channels" 10) "&*" ``` + +## Return information + +{{< multitabs id="acl-getuser-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of ACL rule definitions for the user. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if user does not exist. + +-tab-sep- + +One of the following: +* [Map reply](../../develop/reference/protocol-spec#maps): a set of ACL rule definitions for the user +* [Null reply](../../develop/reference/protocol-spec#nulls): if user does not exist. + +{{< /multitabs >}} diff --git a/content/commands/acl-help.md b/content/commands/acl-help.md index e98c483a7..a5fa4221e 100644 --- a/content/commands/acl-help.md +++ b/content/commands/acl-help.md @@ -28,3 +28,16 @@ title: ACL HELP --- The `ACL HELP` command returns a helpful text describing the different subcommands. +## Return information + +{{< multitabs id="acl-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/acl-list.md b/content/commands/acl-list.md index aa440df68..434daeff2 100644 --- a/content/commands/acl-list.md +++ b/content/commands/acl-list.md @@ -43,3 +43,17 @@ configuration file if you wish (but make sure to check [`ACL SAVE`]({{< relref " 1) "user antirez on #9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 ~objects:* &* +@all -@admin -@dangerous" 2) "user default on nopass ~* &* +@all" ``` + +## Return information + +{{< multitabs id="acl-list-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements. + +{{< /multitabs >}} diff --git a/content/commands/acl-load.md b/content/commands/acl-load.md index 53cca3c69..c7713db9f 100644 --- a/content/commands/acl-load.md +++ b/content/commands/acl-load.md @@ -47,3 +47,21 @@ sure to have an *all or nothing* behavior, that is: > ACL LOAD -ERR /tmp/foo:1: Unknown command or category name in ACL... ``` + +## Return information + +{{< multitabs id="acl-load-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error. +Finally, the command will fail if the server is not configured to use an external ACL file. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error. +Finally, the command will fail if the server is not configured to use an external ACL file. + +{{< /multitabs >}} diff --git a/content/commands/acl-log.md b/content/commands/acl-log.md index 2854c3ac9..c6d8071e4 100644 --- a/content/commands/acl-log.md +++ b/content/commands/acl-log.md @@ -94,4 +94,24 @@ Each log entry is composed of the following fields: 7. `client-info`: Displays the client info of a client which caused one of the security events. 8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were “lost”, if they fell between periods. 9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created. -10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated. \ No newline at end of file +10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated. + +## Return information + +{{< multitabs id="acl-log-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When called to show security events: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events. +When called with `RESET`: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared. + +-tab-sep- + +When called to show security events: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events. +When called with `RESET`: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared. + +{{< /multitabs >}} diff --git a/content/commands/acl-save.md b/content/commands/acl-save.md index d136c536d..43e5828d0 100644 --- a/content/commands/acl-save.md +++ b/content/commands/acl-save.md @@ -45,3 +45,19 @@ option), this command will save the currently defined ACLs from the server memor > ACL SAVE -ERR There was an error trying to save the ACLs. Please check the server logs for more information ``` + +## Return information + +{{< multitabs id="acl-save-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. +The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. +The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file. + +{{< /multitabs >}} diff --git a/content/commands/acl-setuser.md b/content/commands/acl-setuser.md index b35291fa6..f2ac04b36 100644 --- a/content/commands/acl-setuser.md +++ b/content/commands/acl-setuser.md @@ -144,3 +144,19 @@ This is a list of all the supported Redis ACL rules: > ACL SETUSER antirez heeyyyy (error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error ``` + +## Return information + +{{< multitabs id="acl-setuser-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. +If the rules contain errors, the error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. +If the rules contain errors, the error is returned. + +{{< /multitabs >}} diff --git a/content/commands/acl-users.md b/content/commands/acl-users.md index 4a3fc9090..1a8e9cb80 100644 --- a/content/commands/acl-users.md +++ b/content/commands/acl-users.md @@ -41,3 +41,17 @@ users in the Redis ACL system. 2) "antirez" 3) "default" ``` + +## Return information + +{{< multitabs id="acl-users-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users. + +{{< /multitabs >}} diff --git a/content/commands/acl-whoami.md b/content/commands/acl-whoami.md index b276d0d93..e14fb7dc6 100644 --- a/content/commands/acl-whoami.md +++ b/content/commands/acl-whoami.md @@ -37,3 +37,17 @@ can change user using [`AUTH`]({{< relref "/commands/auth" >}}). > ACL WHOAMI "default" ``` + +## Return information + +{{< multitabs id="acl-whoami-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection. + +{{< /multitabs >}} diff --git a/content/commands/append.md b/content/commands/append.md index 845d58bf9..bbb8f8658 100644 --- a/content/commands/append.md +++ b/content/commands/append.md @@ -107,3 +107,16 @@ GETRANGE ts 0 3 GETRANGE ts 4 7 {{% /redis-cli %}} +## Return information + +{{< multitabs id="append-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation. + +{{< /multitabs >}} diff --git a/content/commands/asking.md b/content/commands/asking.md index f3bd9cd02..a17d16f66 100644 --- a/content/commands/asking.md +++ b/content/commands/asking.md @@ -32,3 +32,17 @@ This is normally done automatically by cluster clients. If an `-ASK` redirect is received during a transaction, only one ASKING command needs to be sent to the target node before sending the complete transaction to the target node. See [ASK redirection in the Redis Cluster Specification]({{< relref "/operate/oss_and_stack/reference/cluster-spec#ask-redirection" >}}) for details. + +## Return information + +{{< multitabs id="asking-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/auth.md b/content/commands/auth.md index 0d9f9ee63..bd89e09ef 100644 --- a/content/commands/auth.md +++ b/content/commands/auth.md @@ -79,3 +79,17 @@ Because of the high performance nature of Redis, it is possible to try a lot of passwords in parallel in very short time, so make sure to generate a strong and very long password so that this attack is infeasible. A good way to generate strong passwords is via the [`ACL GENPASS`]({{< relref "/commands/acl-genpass" >}}) command. + +## Return information + +{{< multitabs id="auth-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid. + +{{< /multitabs >}} diff --git a/content/commands/bgrewriteaof.md b/content/commands/bgrewriteaof.md index 4beb64a51..3fe183b3b 100644 --- a/content/commands/bgrewriteaof.md +++ b/content/commands/bgrewriteaof.md @@ -49,3 +49,19 @@ Since Redis 2.4 the AOF rewrite is automatically triggered by Redis, however the `BGREWRITEAOF` command can be used to trigger a rewrite at any time. See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information. + +## Return information + +{{< multitabs id="bgrewriteaof-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success. +The command may reply with an error in certain cases, as documented above. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success. +The command may reply with an error in certain cases, as documented above. + +{{< /multitabs >}} diff --git a/content/commands/bgsave.md b/content/commands/bgsave.md index b45bd6c25..40a179a4f 100644 --- a/content/commands/bgsave.md +++ b/content/commands/bgsave.md @@ -57,3 +57,21 @@ A client may be able to check if the operation succeeded using the [`LASTSAVE`]( command. See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information. + +## Return information + +{{< multitabs id="bgsave-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`. +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`. + +-tab-sep- + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`. +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`. + +{{< /multitabs >}} diff --git a/content/commands/bitcount.md b/content/commands/bitcount.md index 510fe44db..b7661a91b 100644 --- a/content/commands/bitcount.md +++ b/content/commands/bitcount.md @@ -141,3 +141,17 @@ When the bitmap is big, there are two alternatives: * Running the bitmap incrementally using the `BITCOUNT` _start_ and _end_ optional parameters, accumulating the results client-side, and optionally caching the result into a key. + +## Return information + +{{< multitabs id="bitcount-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1. + +{{< /multitabs >}} diff --git a/content/commands/bitfield.md b/content/commands/bitfield.md index 4160ffb17..60a81b7e6 100644 --- a/content/commands/bitfield.md +++ b/content/commands/bitfield.md @@ -229,3 +229,21 @@ bitmap previously set to all zeroes, will produce the following representation: When offsets and integer sizes are aligned to bytes boundaries, this is the same as big endian, however when such alignment does not exist, its important to also understand how the bits inside a byte are ordered. + +## Return information + +{{< multitabs id="bitfield-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if OVERFLOW FAIL was given and overflows or underflows are detected. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position. +* [Null reply](../../develop/reference/protocol-spec#nulls): if OVERFLOW FAIL was given and overflows or underflows are detected. + +{{< /multitabs >}} diff --git a/content/commands/bitfield_ro.md b/content/commands/bitfield_ro.md index b29e7a28c..3f72ea8b1 100644 --- a/content/commands/bitfield_ro.md +++ b/content/commands/bitfield_ro.md @@ -74,3 +74,17 @@ See original [`BITFIELD`]({{< relref "/commands/bitfield" >}}) for more details. ``` BITFIELD_RO hello GET i8 16 ``` + +## Return information + +{{< multitabs id="bitfield-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position. + +{{< /multitabs >}} diff --git a/content/commands/bitop.md b/content/commands/bitop.md index 9da264601..6a18d136d 100644 --- a/content/commands/bitop.md +++ b/content/commands/bitop.md @@ -138,3 +138,17 @@ Care should be taken when running it against long input strings. For real-time metrics and statistics involving large inputs a good approach is to use a replica (with replica-read-only option enabled) where the bit-wise operations are performed to avoid blocking the master instance. + +## Return information + +{{< multitabs id="bitop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the size of the string stored in the destination key is equal to the size of the longest input string. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the size of the string stored in the destination key is equal to the size of the longest input string. + +{{< /multitabs >}} diff --git a/content/commands/bitpos.md b/content/commands/bitpos.md index 7140443e2..6540dd4ba 100644 --- a/content/commands/bitpos.md +++ b/content/commands/bitpos.md @@ -125,4 +125,32 @@ redis> BITPOS mykey 1 (integer) -1 redis> BITPOS mykey 1 7 -3 BIT (integer) -1 -``` \ No newline at end of file +``` + +## Return information + +{{< multitabs id="bitpos-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the position of the first bit set to 1 or 0 according to the request +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1`. In case the `bit` argument is 1 and the string is empty or composed of just zero bytes +If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. +If we look for clear bits (the bit argument is 0) and the string only contains bits set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value `0xff` the command `BITPOS key 0` will return 24, since up to bit 23 all the bits are 1. +The function considers the right of the string as padded with zeros if you look for clear bits and specify no range or the _start_ argument **only**. +However, this behavior changes if you are looking for clear bits and specify a range with both _start_ and _end_. +If a clear bit isn't found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the position of the first bit set to 1 or 0 according to the request +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1`. In case the `bit` argument is 1 and the string is empty or composed of just zero bytes +If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. +If we look for clear bits (the bit argument is 0) and the string only contains bits set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value `0xff` the command `BITPOS key 0` will return 24, since up to bit 23 all the bits are 1. +The function considers the right of the string as padded with zeros if you look for clear bits and specify no range or the _start_ argument **only**. +However, this behavior changes if you are looking for clear bits and specify a range with both _start_ and _end_. +If a clear bit isn't found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range. + +{{< /multitabs >}} diff --git a/content/commands/blmove.md b/content/commands/blmove.md index 7ba11888e..7171828d5 100644 --- a/content/commands/blmove.md +++ b/content/commands/blmove.md @@ -113,3 +113,21 @@ Please see the pattern description in the [`LMOVE`]({{< relref "/commands/lmove" ## Pattern: Circular list Please see the pattern description in the [`LMOVE`]({{< relref "/commands/lmove" >}}) documentation. + +## Return information + +{{< multitabs id="blmove-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from the _source_ and pushed to the _destination_. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the operation timed-out + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from the _source_ and pushed to the _destination_. +* [Null reply](../../develop/reference/protocol-spec#nulls): the operation timed-out + +{{< /multitabs >}} diff --git a/content/commands/blmpop.md b/content/commands/blmpop.md index ccc81bf7f..90a02085a 100644 --- a/content/commands/blmpop.md +++ b/content/commands/blmpop.md @@ -83,3 +83,21 @@ When all lists are empty, Redis will block the connection until another client p A `timeout` of zero can be used to block indefinitely. See [`LMPOP`]({{< relref "/commands/lmpop" >}}) for more information. + +## Return information + +{{< multitabs id="blmpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ is reached. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element being an array of the popped elements. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ is reached. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element being an array of the popped elements. + +{{< /multitabs >}} diff --git a/content/commands/blpop.md b/content/commands/blpop.md index e756008db..c9ae95035 100644 --- a/content/commands/blpop.md +++ b/content/commands/blpop.md @@ -188,3 +188,21 @@ SADD key element LPUSH helper_key x EXEC ``` + +## Return information + +{{< multitabs id="blpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): no element could be popped and the timeout expired +* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): no element could be popped and the timeout expired +* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element. + +{{< /multitabs >}} diff --git a/content/commands/brpop.md b/content/commands/brpop.md index fc9becd67..eb3ef7b47 100644 --- a/content/commands/brpop.md +++ b/content/commands/brpop.md @@ -80,3 +80,21 @@ redis> BRPOP list1 list2 0 1) "list1" 2) "c" ``` + +## Return information + +{{< multitabs id="brpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): no element could be popped and the timeout expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): no element could be popped and the timeout expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element + +{{< /multitabs >}} diff --git a/content/commands/brpoplpush.md b/content/commands/brpoplpush.md index 58893ede7..60d49afdf 100644 --- a/content/commands/brpoplpush.md +++ b/content/commands/brpoplpush.md @@ -96,3 +96,21 @@ Please see the pattern description in the [`RPOPLPUSH`]({{< relref "/commands/rp ## Pattern: Circular list Please see the pattern description in the [`RPOPLPUSH`]({{< relref "/commands/rpoplpush" >}}) documentation. + +## Return information + +{{< multitabs id="brpoplpush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from _source_ and pushed to _destination_. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the timeout is reached. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from _source_ and pushed to _destination_. +* [Null reply](../../develop/reference/protocol-spec#nulls): the timeout is reached. + +{{< /multitabs >}} diff --git a/content/commands/bzmpop.md b/content/commands/bzmpop.md index 1f57b027b..eff8ee44a 100644 --- a/content/commands/bzmpop.md +++ b/content/commands/bzmpop.md @@ -85,3 +85,21 @@ When all sorted sets are empty, Redis will block the connection until another cl A `timeout` of zero can be used to block indefinitely. See [`ZMPOP`]({{< relref "/commands/zmpop" >}}) for more information. + +## Return information + +{{< multitabs id="bzmpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score. + +{{< /multitabs >}} diff --git a/content/commands/bzpopmax.md b/content/commands/bzpopmax.md index 54a999df3..c9b955967 100644 --- a/content/commands/bzpopmax.md +++ b/content/commands/bzpopmax.md @@ -88,3 +88,21 @@ redis> BZPOPMAX zset1 zset2 0 2) "c" 3) "2" ``` + +## Return information + +{{< multitabs id="bzpopmax-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score. + +{{< /multitabs >}} diff --git a/content/commands/bzpopmin.md b/content/commands/bzpopmin.md index cf6b4ba67..8a996a722 100644 --- a/content/commands/bzpopmin.md +++ b/content/commands/bzpopmin.md @@ -88,3 +88,21 @@ redis> BZPOPMIN zset1 zset2 0 2) "a" 3) "0" ``` + +## Return information + +{{< multitabs id="bzpopmin-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ expired. +* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score. + +{{< /multitabs >}} diff --git a/content/commands/client-caching.md b/content/commands/client-caching.md index f5c679e64..9c3419f0d 100644 --- a/content/commands/client-caching.md +++ b/content/commands/client-caching.md @@ -58,3 +58,17 @@ tracked using `CLIENT CACHING no`. Basically the command sets a state in the connection, that is valid only for the next command execution, that will modify the behavior of client tracking. + +## Return information + +{{< multitabs id="client-caching-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the argument is not "yes" or "no". + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the argument is not "yes" or "no". + +{{< /multitabs >}} diff --git a/content/commands/client-getname.md b/content/commands/client-getname.md index 7ecee2a3f..bec662194 100644 --- a/content/commands/client-getname.md +++ b/content/commands/client-getname.md @@ -29,3 +29,21 @@ syntax_str: '' title: CLIENT GETNAME --- The `CLIENT GETNAME` returns the name of the current connection as set by [`CLIENT SETNAME`]({{< relref "/commands/client-setname" >}}). Since every new connection starts without an associated name, if no name was assigned a null bulk reply is returned. + +## Return information + +{{< multitabs id="client-getname-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the connection name of the current connection. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the connection name was not set. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the connection name of the current connection. +* [Null reply](../../develop/reference/protocol-spec#nulls): the connection name was not set. + +{{< /multitabs >}} diff --git a/content/commands/client-getredir.md b/content/commands/client-getredir.md index 0d43ecd49..bb8cd971f 100644 --- a/content/commands/client-getredir.md +++ b/content/commands/client-getredir.md @@ -37,3 +37,23 @@ order to avoid forcing client libraries implementations to remember the ID notifications are redirected to, this command exists in order to improve introspection and allow clients to check later if redirection is active and towards which client ID. + +## Return information + +{{< multitabs id="client-getredir-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled. +* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled. +* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected. + +{{< /multitabs >}} diff --git a/content/commands/client-help.md b/content/commands/client-help.md index 21c2c8e2c..26c5d0c5a 100644 --- a/content/commands/client-help.md +++ b/content/commands/client-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: CLIENT HELP --- The `CLIENT HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="client-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/client-id.md b/content/commands/client-id.md index 999a6c667..9c8f9d0d5 100644 --- a/content/commands/client-id.md +++ b/content/commands/client-id.md @@ -43,3 +43,16 @@ introduced also in Redis 5 together with `CLIENT ID`. Check the [`CLIENT UNBLOCK CLIENT ID {{% /redis-cli %}} +## Return information + +{{< multitabs id="client-id-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client. + +{{< /multitabs >}} diff --git a/content/commands/client-info.md b/content/commands/client-info.md index 789d182c2..a172a051c 100644 --- a/content/commands/client-info.md +++ b/content/commands/client-info.md @@ -40,3 +40,16 @@ The reply format is identical to that of [`CLIENT LIST`]({{< relref "/commands/c CLIENT INFO {{% /redis-cli %}} +## Return information + +{{< multitabs id="client-info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a unique string for the current client, as described at the `CLIENT LIST` page. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a unique string for the current client, as described at the `CLIENT LIST` page. + +{{< /multitabs >}} diff --git a/content/commands/client-kill.md b/content/commands/client-kill.md index 08ac930f4..9b104dd82 100644 --- a/content/commands/client-kill.md +++ b/content/commands/client-kill.md @@ -173,3 +173,21 @@ the client point of view, the connection can never be closed in the middle of the execution of a command. However, the client will notice the connection has been closed only when the next command is sent (and results in network error). + +## Return information + +{{< multitabs id="client-kill-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called in 3 argument format and the connection has been closed. +* [Integer reply](../../develop/reference/protocol-spec#integers): when called in filter/value format, the number of clients killed. + +-tab-sep- + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called in 3 argument format and the connection has been closed. +* [Integer reply](../../develop/reference/protocol-spec#integers): when called in filter/value format, the number of clients killed. + +{{< /multitabs >}} diff --git a/content/commands/client-list.md b/content/commands/client-list.md index a093bb29b..5d05e66c0 100644 --- a/content/commands/client-list.md +++ b/content/commands/client-list.md @@ -158,3 +158,17 @@ New fields are regularly added for debugging purpose. Some could be removed in the future. A version safe Redis client using this command should parse the output accordingly (i.e. handling gracefully missing fields, skipping unknown fields). + +## Return information + +{{< multitabs id="client-list-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): information and statistics about client connections. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): information and statistics about client connections. + +{{< /multitabs >}} diff --git a/content/commands/client-pause.md b/content/commands/client-pause.md index a9ceeb981..115baeba4 100644 --- a/content/commands/client-pause.md +++ b/content/commands/client-pause.md @@ -90,4 +90,18 @@ to be static not just from the point of view of clients not being able to write, ## Behavior change history -* `>= 3.2.0`: Client pause prevents client pause and key eviction as well. \ No newline at end of file +* `>= 3.2.0`: Client pause prevents client pause and key eviction as well. + +## Return information + +{{< multitabs id="client-pause-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the timeout is invalid. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the timeout is invalid. + +{{< /multitabs >}} diff --git a/content/commands/client-reply.md b/content/commands/client-reply.md index 96cc5ed82..7d9ddc54f 100644 --- a/content/commands/client-reply.md +++ b/content/commands/client-reply.md @@ -51,3 +51,17 @@ The `CLIENT REPLY` command controls whether the server will reply the client's c * `ON`. This is the default mode in which the server returns a reply to every command. * `OFF`. In this mode the server will not reply to client commands. * `SKIP`. This mode skips the reply of command immediately after it. + +## Return information + +{{< multitabs id="client-reply-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called with `ON`. When called with either `OFF` or `SKIP` sub-commands, no reply is made. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called with `ON`. When called with either `OFF` or `SKIP` sub-commands, no reply is made. + +{{< /multitabs >}} diff --git a/content/commands/client-setinfo.md b/content/commands/client-setinfo.md index 3ab32bfc2..504c87739 100644 --- a/content/commands/client-setinfo.md +++ b/content/commands/client-setinfo.md @@ -61,3 +61,17 @@ Brace characters are used to delimit the custom suffix and should be avoided in We recommend using the following format for the custom suffixes for third-party libraries `(?[ -~]+)[ -~]v(?[\d\.]+)` and use `;` to delimit multiple suffixes. Note that these attributes are **not** cleared by the RESET command. + +## Return information + +{{< multitabs id="client-setinfo-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set. + +{{< /multitabs >}} diff --git a/content/commands/client-setname.md b/content/commands/client-setname.md index 92d52303f..06b954d96 100644 --- a/content/commands/client-setname.md +++ b/content/commands/client-setname.md @@ -50,3 +50,17 @@ The connection name can be inspected using [`CLIENT GETNAME`]({{< relref "/comma Every new connection starts without an assigned name. Tip: setting names to connections is a good way to debug connection leaks due to bugs in the application using Redis. + +## Return information + +{{< multitabs id="client-setname-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection name was successfully set. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection name was successfully set. + +{{< /multitabs >}} diff --git a/content/commands/client-tracking.md b/content/commands/client-tracking.md index 3146cc84e..3e59c9983 100644 --- a/content/commands/client-tracking.md +++ b/content/commands/client-tracking.md @@ -103,3 +103,17 @@ command when enabling tracking: * `OPTIN`: when broadcasting is NOT active, normally don't track keys in read only commands, unless they are called immediately after a `CLIENT CACHING yes` command. * `OPTOUT`: when broadcasting is NOT active, normally track keys in read only commands, unless they are called immediately after a `CLIENT CACHING no` command. * `NOLOOP`: don't send notifications about keys modified by this connection itself. + +## Return information + +{{< multitabs id="client-tracking-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection was successfully put in tracking mode or if the tracking mode was successfully disabled. Otherwise, an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection was successfully put in tracking mode or if the tracking mode was successfully disabled. Otherwise, an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/client-trackinginfo.md b/content/commands/client-trackinginfo.md index 361fa7419..9624a1315 100644 --- a/content/commands/client-trackinginfo.md +++ b/content/commands/client-trackinginfo.md @@ -45,3 +45,17 @@ Here's the list of tracking information sections and their respective values: * `broken_redirect`: The client ID used for redirection isn't valid anymore. * **redirect**: The client ID used for notifications redirection, 0 for self-redirection, or -1 when none. * **prefixes**: A list of key prefixes for which notifications are sent to the client. + +## Return information + +{{< multitabs id="client-trackinginfo-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of tracking information sections and their respective values. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a list of tracking information sections and their respective values. + +{{< /multitabs >}} diff --git a/content/commands/client-unblock.md b/content/commands/client-unblock.md index 350549957..e22276132 100644 --- a/content/commands/client-unblock.md +++ b/content/commands/client-unblock.md @@ -98,3 +98,21 @@ NULL > BRPOP key1 key2 key3 key4 0 (client is blocked again) ``` + +## Return information + +{{< multitabs id="client-unblock-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the client was unblocked successfully. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the client wasn't unblocked. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the client was unblocked successfully. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the client wasn't unblocked. + +{{< /multitabs >}} diff --git a/content/commands/client-unpause.md b/content/commands/client-unpause.md index 5828fb944..62131bf81 100644 --- a/content/commands/client-unpause.md +++ b/content/commands/client-unpause.md @@ -32,3 +32,17 @@ syntax_str: '' title: CLIENT UNPAUSE --- `CLIENT UNPAUSE` is used to resume command processing for all clients that were paused by [`CLIENT PAUSE`]({{< relref "/commands/client-pause" >}}). + +## Return information + +{{< multitabs id="client-unpause-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/cluster-addslots.md b/content/commands/cluster-addslots.md index fc8e78b68..a89e22a1e 100644 --- a/content/commands/cluster-addslots.md +++ b/content/commands/cluster-addslots.md @@ -81,3 +81,17 @@ This means that this command should be used with care only by applications orchestrating Redis Cluster, like `redis-cli`, and the command if used out of the right context can leave the cluster in a wrong state or cause data loss. + +## Return information + +{{< multitabs id="cluster-addslots-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-addslotsrange.md b/content/commands/cluster-addslotsrange.md index f6a5f8d9a..41412a97e 100644 --- a/content/commands/cluster-addslotsrange.md +++ b/content/commands/cluster-addslotsrange.md @@ -64,3 +64,17 @@ This command only works in cluster mode and is useful in the following Redis Clu 1. To create a new cluster, `CLUSTER ADDSLOTSRANGE` is used to initially set up master nodes splitting the available hash slots among them. 2. In order to fix a broken cluster where certain slots are unassigned. + +## Return information + +{{< multitabs id="cluster-addslotsrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-bumpepoch.md b/content/commands/cluster-bumpepoch.md index f2b010b78..ba047348a 100644 --- a/content/commands/cluster-bumpepoch.md +++ b/content/commands/cluster-bumpepoch.md @@ -36,3 +36,21 @@ Advances the cluster config epoch. The `CLUSTER BUMPEPOCH` command triggers an increment to the cluster's config epoch from the connected node. The epoch will be incremented if the node's config epoch is zero, or if it is less than the cluster's greatest epoch. **Note:** config epoch management is performed internally by the cluster, and relies on obtaining a consensus of nodes. The `CLUSTER BUMPEPOCH` attempts to increment the config epoch **WITHOUT** getting the consensus, so using it may violate the "last failover wins" rule. Use it with caution. + +## Return information + +{{< multitabs id="cluster-bumpepoch-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `BUMPED` if the epoch was incremented. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `STILL` if the node already has the greatest configured epoch in the cluster. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `BUMPED` if the epoch was incremented. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `STILL` if the node already has the greatest configured epoch in the cluster. + +{{< /multitabs >}} diff --git a/content/commands/cluster-countkeysinslot.md b/content/commands/cluster-countkeysinslot.md index bd8f30d8d..40e0db713 100644 --- a/content/commands/cluster-countkeysinslot.md +++ b/content/commands/cluster-countkeysinslot.md @@ -38,3 +38,17 @@ zero being returned. > CLUSTER COUNTKEYSINSLOT 7000 (integer) 50341 ``` + +## Return information + +{{< multitabs id="cluster-countkeysinslot-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): The number of keys in the specified hash slot, or an error if the hash slot is invalid. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The number of keys in the specified hash slot, or an error if the hash slot is invalid. + +{{< /multitabs >}} diff --git a/content/commands/cluster-delslots.md b/content/commands/cluster-delslots.md index 45774d5b0..485f95726 100644 --- a/content/commands/cluster-delslots.md +++ b/content/commands/cluster-delslots.md @@ -77,3 +77,17 @@ This command only works in cluster mode and may be useful for debugging and in order to manually orchestrate a cluster configuration when a new cluster is created. It is currently not used by `redis-cli`, and mainly exists for API completeness. + +## Return information + +{{< multitabs id="cluster-delslots-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-delslotsrange.md b/content/commands/cluster-delslotsrange.md index 26045c630..a6984953d 100644 --- a/content/commands/cluster-delslotsrange.md +++ b/content/commands/cluster-delslotsrange.md @@ -68,3 +68,17 @@ This command only works in cluster mode and may be useful for debugging and in order to manually orchestrate a cluster configuration when a new cluster is created. It is currently not used by `redis-cli`, and mainly exists for API completeness. + +## Return information + +{{< multitabs id="cluster-delslotsrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-failover.md b/content/commands/cluster-failover.md index c5595cd7e..8d2086f3d 100644 --- a/content/commands/cluster-failover.md +++ b/content/commands/cluster-failover.md @@ -105,3 +105,17 @@ Because of this the **TAKEOVER** option should be used with care. To check that the masters are aware of a new replica, you can send [`CLUSTER NODES`]({{< relref "/commands/cluster-nodes" >}}) or [`CLUSTER REPLICAS`]({{< relref "/commands/cluster-replicas" >}}) to each of the master nodes and check that it appears as a replica, before sending `CLUSTER FAILOVER` to the replica. * To check that the failover has actually happened you can use [`ROLE`]({{< relref "/commands/role" >}}), `INFO REPLICATION` (which indicates "role:master" after successful failover), or [`CLUSTER NODES`]({{< relref "/commands/cluster-nodes" >}}) to verify that the state of the cluster has changed sometime after the command was sent. * To check if the failover has failed, check the replica's log for "Manual failover timed out", which is logged if the replica has given up after a few seconds. + +## Return information + +{{< multitabs id="cluster-failover-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a manual failover is going to be attempted. An error if the operation cannot be executed, for example if the client is connected to a node that is already a master. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a manual failover is going to be attempted. An error if the operation cannot be executed, for example if the client is connected to a node that is already a master. + +{{< /multitabs >}} diff --git a/content/commands/cluster-flushslots.md b/content/commands/cluster-flushslots.md index 8b852571c..a964d19c7 100644 --- a/content/commands/cluster-flushslots.md +++ b/content/commands/cluster-flushslots.md @@ -32,3 +32,17 @@ title: CLUSTER FLUSHSLOTS Deletes all slots from a node. The `CLUSTER FLUSHSLOTS` deletes all information about slots from the connected node. It can only be called when the database is empty. + +## Return information + +{{< multitabs id="cluster-flushslots-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/cluster-forget.md b/content/commands/cluster-forget.md index be32f548b..da17857d3 100644 --- a/content/commands/cluster-forget.md +++ b/content/commands/cluster-forget.md @@ -98,3 +98,17 @@ The command does not succeed and returns an error in the following cases: * `>= 7.2.0`: Automatically propagate node deletion to other nodes in a cluster, allowing nodes to be deleted with a single call in most cases. + +## Return information + +{{< multitabs id="cluster-forget-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was executed successfully. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was executed successfully. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-getkeysinslot.md b/content/commands/cluster-getkeysinslot.md index 0b685055e..8985ca79d 100644 --- a/content/commands/cluster-getkeysinslot.md +++ b/content/commands/cluster-getkeysinslot.md @@ -50,3 +50,17 @@ of the [`CLUSTER SETSLOT`]({{< relref "/commands/cluster-setslot" >}}) command d 2) "key_89793" 3) "key_92937" ``` + +## Return information + +{{< multitabs id="cluster-getkeysinslot-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array with up to count elements. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array with up to count elements. + +{{< /multitabs >}} diff --git a/content/commands/cluster-help.md b/content/commands/cluster-help.md index 342926421..aa169206f 100644 --- a/content/commands/cluster-help.md +++ b/content/commands/cluster-help.md @@ -27,3 +27,17 @@ syntax_str: '' title: CLUSTER HELP --- The `CLUSTER HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="cluster-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/cluster-info.md b/content/commands/cluster-info.md index 8d07a9035..4b38d899f 100644 --- a/content/commands/cluster-info.md +++ b/content/commands/cluster-info.md @@ -75,3 +75,17 @@ Here are the explanation of these fields: * `cluster_stats_messages_publishshard_sent` and `cluster_stats_messages_publishshard_received`: Pub/Sub Publish shard propagation, see [Sharded Pubsub]({{< relref "/develop/interact/pubsub#sharded-pubsub" >}}). More information about the Current Epoch and Config Epoch variables are available in the [Redis Cluster specification document]({{< relref "/operate/oss_and_stack/reference/cluster-spec#cluster-current-epoch" >}}). + +## Return information + +{{< multitabs id="cluster-info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): A map between named fields and values in the form of `:` lines separated by newlines composed by the two bytes `CRLF`. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): A map between named fields and values in the form of : lines separated by newlines composed by the two bytes CRLF + +{{< /multitabs >}} diff --git a/content/commands/cluster-keyslot.md b/content/commands/cluster-keyslot.md index 419048859..3be380bc6 100644 --- a/content/commands/cluster-keyslot.md +++ b/content/commands/cluster-keyslot.md @@ -49,3 +49,17 @@ Example use cases for this command: ``` Note that the command implements the full hashing algorithm, including support for **hash tags**, that is the special property of Redis Cluster key hashing algorithm, of hashing just what is between `{` and `}` if such a pattern is found inside the key name, in order to force multiple keys to be handled by the same node. + +## Return information + +{{< multitabs id="cluster-keyslot-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): The hash slot number for the specified key + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The hash slot number for the specified key + +{{< /multitabs >}} diff --git a/content/commands/cluster-links.md b/content/commands/cluster-links.md index f764362b4..8a3e841eb 100644 --- a/content/commands/cluster-links.md +++ b/content/commands/cluster-links.md @@ -71,3 +71,17 @@ Each map is composed of the following attributes of the corresponding cluster li 4. `events`: Events currently registered for the link. `r` means readable event, `w` means writable event. 5. `send-buffer-allocated`: Allocated size of the link's send buffer, which is used to buffer outgoing messages toward the peer. 6. `send-buffer-used`: Size of the portion of the link's send buffer that is currently holding data(messages). + +## Return information + +{{< multitabs id="cluster-links-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of maps where each map contains various attributes and their values of a cluster link. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Map reply](../../develop/reference/protocol-spec#maps) where each map contains various attributes and their values of a cluster link. + +{{< /multitabs >}} diff --git a/content/commands/cluster-meet.md b/content/commands/cluster-meet.md index fd5014180..ab83f8fc7 100644 --- a/content/commands/cluster-meet.md +++ b/content/commands/cluster-meet.md @@ -82,3 +82,17 @@ the node to force the receiver to accept it as a trusted node, it sends a `MEET` packet instead of a [`PING`]({{< relref "/commands/ping" >}}) packet. The two packets have exactly the same format, but the former forces the receiver to acknowledge the node as trusted. + +## Return information + +{{< multitabs id="cluster-meet-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-myid.md b/content/commands/cluster-myid.md index 021ebf55e..c58d814c5 100644 --- a/content/commands/cluster-myid.md +++ b/content/commands/cluster-myid.md @@ -28,3 +28,17 @@ title: CLUSTER MYID Returns the node's id. The `CLUSTER MYID` command returns the unique, auto-generated identifier that is associated with the connected cluster node. + +## Return information + +{{< multitabs id="cluster-myid-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node ID. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node ID. + +{{< /multitabs >}} diff --git a/content/commands/cluster-myshardid.md b/content/commands/cluster-myshardid.md index f5dca75a8..0d575dd1a 100644 --- a/content/commands/cluster-myshardid.md +++ b/content/commands/cluster-myshardid.md @@ -30,3 +30,17 @@ title: CLUSTER MYSHARDID Returns the node's shard id. The `CLUSTER MYSHARDID` command returns the unique, auto-generated identifier that is associated with the shard to which the connected cluster node belongs. + +## Return information + +{{< multitabs id="cluster-myshardid-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node's shard ID. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node's shard ID. + +{{< /multitabs >}} diff --git a/content/commands/cluster-nodes.md b/content/commands/cluster-nodes.md index a8877ae8d..a4ad0f85c 100644 --- a/content/commands/cluster-nodes.md +++ b/content/commands/cluster-nodes.md @@ -135,3 +135,17 @@ Note that: 2. Importing and migrating slots are provided as **additional info**. If the node has a given hash slot assigned, it will be also a plain number in the list of hash slots, so clients that don't have a clue about hash slots migrations can just skip this special fields. **A note about the word slave used in this man page and command name**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated. + +## Return information + +{{< multitabs id="cluster-nodes-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized cluster configuration. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized cluster configuration. + +{{< /multitabs >}} diff --git a/content/commands/cluster-replicas.md b/content/commands/cluster-replicas.md index 3e376236e..ea48ebefc 100644 --- a/content/commands/cluster-replicas.md +++ b/content/commands/cluster-replicas.md @@ -45,3 +45,17 @@ and we ask `CLUSTER REPLICAS` to a node that has not yet received the configuration update, it may show stale information. However eventually (in a matter of seconds if there are no network partitions) all the nodes will agree about the set of nodes associated with a given master. + +## Return information + +{{< multitabs id="cluster-replicas-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`. + +{{< /multitabs >}} diff --git a/content/commands/cluster-replicate.md b/content/commands/cluster-replicate.md index 1d667ec6c..5884658d4 100644 --- a/content/commands/cluster-replicate.md +++ b/content/commands/cluster-replicate.md @@ -55,3 +55,17 @@ only if the following additional conditions are met: 2. The node is empty, no keys are stored at all in the key space. If the command succeeds the new replica will immediately try to contact its master in order to replicate from it. + +## Return information + +{{< multitabs id="cluster-replicate-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-reset.md b/content/commands/cluster-reset.md index fcccb19f6..a37b015f7 100644 --- a/content/commands/cluster-reset.md +++ b/content/commands/cluster-reset.md @@ -64,3 +64,17 @@ is also extensively used by the Redis Cluster testing framework in order to reset the state of the cluster every time a new test unit is executed. If no reset type is specified, the default is **soft**. + +## Return information + +{{< multitabs id="cluster-reset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-saveconfig.md b/content/commands/cluster-saveconfig.md index c5fde5df6..347572890 100644 --- a/content/commands/cluster-saveconfig.md +++ b/content/commands/cluster-saveconfig.md @@ -40,3 +40,17 @@ configuration via the [`CLUSTER`]({{< relref "/commands/cluster" >}}) command in is persisted on disk, however all the commands should normally be able to auto schedule to persist the configuration on disk when it is important to do so for the correctness of the system in the event of a restart. + +## Return information + +{{< multitabs id="cluster-saveconfig-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-setslot.md b/content/commands/cluster-setslot.md index 0f108792c..939677e13 100644 --- a/content/commands/cluster-setslot.md +++ b/content/commands/cluster-setslot.md @@ -134,3 +134,17 @@ Notes: If the source node is informed before the destination node and the destination node crashes before it is set as new slot owner, the slot is left with no owner, even after a successful failover. * Step 6, sending `SETSLOT` to the nodes not involved in the resharding, is not technically necessary since the configuration will eventually propagate itself. However, it is a good idea to do so in order to stop nodes from pointing to the wrong node for the hash slot moved as soon as possible, resulting in less redirections to find the right node. + +## Return information + +{{< multitabs id="cluster-setslot-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): all the sub-commands return `OK` if the command was successful. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): all the sub-commands return `OK` if the command was successful. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/cluster-shards.md b/content/commands/cluster-shards.md index 41dace558..18a6b5833 100644 --- a/content/commands/cluster-shards.md +++ b/content/commands/cluster-shards.md @@ -181,3 +181,17 @@ Clients may treat the empty string in the same way as NULL, that is the same end 13) "health" 14) "online" ``` + +## Return information + +{{< multitabs id="cluster-shards-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of a map of hash ranges and shard nodes describing individual shards. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of [Map reply](../../develop/reference/protocol-spec#maps) of hash ranges and shard nodes describing individual shards. + +{{< /multitabs >}} diff --git a/content/commands/cluster-slaves.md b/content/commands/cluster-slaves.md index 146271883..93f80bc23 100644 --- a/content/commands/cluster-slaves.md +++ b/content/commands/cluster-slaves.md @@ -51,3 +51,17 @@ and we ask `CLUSTER SLAVES` to a node that has not yet received the configuration update, it may show stale information. However eventually (in a matter of seconds if there are no network partitions) all the nodes will agree about the set of nodes associated with a given master. + +## Return information + +{{< multitabs id="cluster-slaves-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`. + +{{< /multitabs >}} diff --git a/content/commands/cluster-slots.md b/content/commands/cluster-slots.md index 904549cdc..a7a1def71 100644 --- a/content/commands/cluster-slots.md +++ b/content/commands/cluster-slots.md @@ -127,3 +127,17 @@ Similarly a client library should try if possible to cope with the fact that old ## Behavior change history * `>= 7.0.0`: Added support for hostnames and unknown endpoints in first field of node response. + +## Return information + +{{< multitabs id="cluster-slots-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): nested list of slot ranges with networking information. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): nested list of slot ranges with networking information. + +{{< /multitabs >}} diff --git a/content/commands/command-count.md b/content/commands/command-count.md index 54a820d4a..b7b39312a 100644 --- a/content/commands/command-count.md +++ b/content/commands/command-count.md @@ -35,3 +35,16 @@ Returns [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" > COMMAND COUNT {{% /redis-cli %}} +## Return information + +{{< multitabs id="command-count-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of commands returned by `COMMAND`. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of commands returned by `COMMAND`. + +{{< /multitabs >}} diff --git a/content/commands/command-docs.md b/content/commands/command-docs.md index 64d518671..3d26b798f 100644 --- a/content/commands/command-docs.md +++ b/content/commands/command-docs.md @@ -87,3 +87,16 @@ The following keys may be included in the mapped reply: COMMAND DOCS SET {{% /redis-cli %}} +## Return information + +{{< multitabs id="command-docs-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a map, as a flattened array, where each key is a command name, and each value is the documentary information. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a map where each key is a command name, and each value is the documentary information. + +{{< /multitabs >}} diff --git a/content/commands/command-getkeys.md b/content/commands/command-getkeys.md index d87254aa3..7238ed028 100644 --- a/content/commands/command-getkeys.md +++ b/content/commands/command-getkeys.md @@ -53,3 +53,16 @@ COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN COMMAND GETKEYS SORT mylist ALPHA STORE outlist {{% /redis-cli %}} +## Return information + +{{< multitabs id="command-getkeys-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): list of keys from the given command. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command. + +{{< /multitabs >}} diff --git a/content/commands/command-getkeysandflags.md b/content/commands/command-getkeysandflags.md index 1fb0a41d7..d69f413f2 100644 --- a/content/commands/command-getkeysandflags.md +++ b/content/commands/command-getkeysandflags.md @@ -54,3 +54,16 @@ COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN COMMAND GETKEYSANDFLAGS LMOVE mylist1 mylist2 left left {{% /redis-cli %}} +## Return information + +{{< multitabs id="command-getkeysandflags-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command and their usage flags. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command and their usage flags. + +{{< /multitabs >}} diff --git a/content/commands/command-help.md b/content/commands/command-help.md index bcf70082c..ec008c883 100644 --- a/content/commands/command-help.md +++ b/content/commands/command-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: COMMAND HELP --- The `COMMAND HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="command-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/command-info.md b/content/commands/command-info.md index 03e76e1d0..491598f54 100644 --- a/content/commands/command-info.md +++ b/content/commands/command-info.md @@ -53,3 +53,16 @@ COMMAND INFO get set eval COMMAND INFO foo evalsha config bar {{% /redis-cli %}} +## Return information + +{{< multitabs id="command-info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. + +{{< /multitabs >}} diff --git a/content/commands/command-list.md b/content/commands/command-list.md index 2e1cc3415..bd7121d37 100644 --- a/content/commands/command-list.md +++ b/content/commands/command-list.md @@ -55,3 +55,17 @@ You can use the optional _FILTERBY_ modifier to apply one of the following filte - **MODULE module-name**: get the commands that belong to the module specified by _module-name_. - **ACLCAT category**: get the commands in the [ACL category]({{< relref "operate/oss_and_stack/management/security/acl#command-categories" >}}) specified by _category_. - **PATTERN pattern**: get the commands that match the given glob-like _pattern_. + +## Return information + +{{< multitabs id="command-list-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of command names. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of command names. + +{{< /multitabs >}} diff --git a/content/commands/command.md b/content/commands/command.md index d5079de72..c30565828 100644 --- a/content/commands/command.md +++ b/content/commands/command.md @@ -264,3 +264,17 @@ The following is `COMMAND`'s output for the [`GET`]({{< relref "/commands/get" > 10) (empty array) ... ``` + +## Return information + +{{< multitabs id="command-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. The order of the commands in the array is random. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. The order of the commands in the array is random. + +{{< /multitabs >}} diff --git a/content/commands/config-get.md b/content/commands/config-get.md index 62612b984..d4dde9283 100644 --- a/content/commands/config-get.md +++ b/content/commands/config-get.md @@ -78,3 +78,17 @@ configuration parameter used in the [redis.conf][hgcarr22rc] file: Note that you should look at the redis.conf file relevant to the version you're working with as configuration options might change between versions. The link above is to the latest development version. + +## Return information + +{{< multitabs id="config-get-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of configuration parameters matching the provided arguments. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a list of configuration parameters matching the provided arguments. + +{{< /multitabs >}} diff --git a/content/commands/config-help.md b/content/commands/config-help.md index 5c83bc044..c0cefc4e2 100644 --- a/content/commands/config-help.md +++ b/content/commands/config-help.md @@ -27,3 +27,17 @@ syntax_str: '' title: CONFIG HELP --- The `CONFIG HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="config-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/config-resetstat.md b/content/commands/config-resetstat.md index 8fb4c3dc3..956ad0dab 100644 --- a/content/commands/config-resetstat.md +++ b/content/commands/config-resetstat.md @@ -43,3 +43,17 @@ The following is a non-exhaustive list of values that are reset: * Connections received, rejected and evicted * Persistence statistics * Active defragmentation statistics + +## Return information + +{{< multitabs id="config-resetstat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/config-rewrite.md b/content/commands/config-rewrite.md index b1e1a13b1..b756356b0 100644 --- a/content/commands/config-rewrite.md +++ b/content/commands/config-rewrite.md @@ -48,3 +48,17 @@ CONFIG REWRITE is also able to rewrite the configuration file from scratch if th ## Atomic rewrite process In order to make sure the redis.conf file is always consistent, that is, on errors or crashes you always end with the old file, or the new one, the rewrite is performed with a single `write(2)` call that has enough content to be at least as big as the old file. Sometimes additional padding in the form of comments is added in order to make sure the resulting file is big enough, and later the file gets truncated to remove the padding at the end. + +## Return information + +{{< multitabs id="config-rewrite-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was rewritten properly. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was rewritten properly. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/config-set.md b/content/commands/config-set.md index d94da6320..7f45171c9 100644 --- a/content/commands/config-set.md +++ b/content/commands/config-set.md @@ -80,3 +80,17 @@ Redis server that started with AOF turned on since the start. You can have both the AOF enabled with RDB snapshotting if you want, the two options are not mutually exclusive. + +## Return information + +{{< multitabs id="config-set-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/copy.md b/content/commands/copy.md index 4c1b57f11..7c42d6e7a 100644 --- a/content/commands/copy.md +++ b/content/commands/copy.md @@ -90,3 +90,21 @@ SET dolly "sheep" COPY dolly clone GET clone ``` + +## Return information + +{{< multitabs id="copy-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _source_ was copied. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _source_ was not copied. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _source_ was copied. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _source_ was not copied. + +{{< /multitabs >}} diff --git a/content/commands/dbsize.md b/content/commands/dbsize.md index 9060bc04e..77ada78ac 100644 --- a/content/commands/dbsize.md +++ b/content/commands/dbsize.md @@ -32,3 +32,17 @@ syntax_str: '' title: DBSIZE --- Return the number of keys in the currently-selected database. + +## Return information + +{{< multitabs id="dbsize-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys in the currently-selected database. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys in the currently-selected database. + +{{< /multitabs >}} diff --git a/content/commands/decr.md b/content/commands/decr.md index 57155c583..da3d531eb 100644 --- a/content/commands/decr.md +++ b/content/commands/decr.md @@ -67,3 +67,16 @@ SET mykey "234293482390480948029348230948" DECR mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="decr-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it. + +{{< /multitabs >}} diff --git a/content/commands/decrby.md b/content/commands/decrby.md index 31ebe6aa1..d8e1d6960 100644 --- a/content/commands/decrby.md +++ b/content/commands/decrby.md @@ -66,3 +66,17 @@ See [`INCR`]({{< relref "/commands/incr" >}}) for extra information on increment SET mykey "10" DECRBY mykey 3 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="decrby-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it. + +{{< /multitabs >}} diff --git a/content/commands/del.md b/content/commands/del.md index d8053f5d0..d9aaf8964 100644 --- a/content/commands/del.md +++ b/content/commands/del.md @@ -74,3 +74,16 @@ SET key2 "World" DEL key1 key2 key3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="del-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were removed. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were removed. + +{{< /multitabs >}} diff --git a/content/commands/discard.md b/content/commands/discard.md index d8561c328..fd9a1580a 100644 --- a/content/commands/discard.md +++ b/content/commands/discard.md @@ -36,3 +36,17 @@ connection state to normal. [tt]: /develop/interact/transactions If [`WATCH`]({{< relref "/commands/watch" >}}) was used, `DISCARD` unwatches all keys watched by the connection. + +## Return information + +{{< multitabs id="discard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/dump.md b/content/commands/dump.md index 25bbe59fc..6e4a7da7d 100644 --- a/content/commands/dump.md +++ b/content/commands/dump.md @@ -81,3 +81,21 @@ OK > DUMP mykey "\x00\xc0\n\n\x00n\x9fWE\x0e\xaec\xbb" ``` + +## Return information + +{{< multitabs id="dump-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The serialized value of the key. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the key does not exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized value of the key. +* [Null reply](../../develop/reference/protocol-spec#nulls): the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/echo.md b/content/commands/echo.md index 5a0c807cf..ac54ca9a4 100644 --- a/content/commands/echo.md +++ b/content/commands/echo.md @@ -40,3 +40,16 @@ Returns `message`. ECHO "Hello World!" {{% /redis-cli %}} +## Return information + +{{< multitabs id="echo-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the given string. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the given string. + +{{< /multitabs >}} diff --git a/content/commands/eval.md b/content/commands/eval.md index 7ea5fd931..01575fc40 100644 --- a/content/commands/eval.md +++ b/content/commands/eval.md @@ -93,3 +93,17 @@ The following example will run a script that returns the first argument that it > EVAL "return ARGV[1]" 0 hello "hello" ``` + +## Return information + +{{< multitabs id="eval-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the script that was executed. + +-tab-sep- + +The return value depends on the script that was executed. + +{{< /multitabs >}} diff --git a/content/commands/eval_ro.md b/content/commands/eval_ro.md index 715c454f5..b50d27b9f 100644 --- a/content/commands/eval_ro.md +++ b/content/commands/eval_ro.md @@ -81,3 +81,17 @@ OK > EVAL_RO "return redis.call('DEL', KEYS[1])" 1 mykey (error) ERR Error running script (call to b0d697da25b13e49157b2c214a4033546aba2104): @user_script:1: @user_script: 1: Write commands are not allowed from read-only scripts. ``` + +## Return information + +{{< multitabs id="eval-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the script that was executed. + +-tab-sep- + +The return value depends on the script that was executed. + +{{< /multitabs >}} diff --git a/content/commands/evalsha.md b/content/commands/evalsha.md index a57975e51..c3bb47655 100644 --- a/content/commands/evalsha.md +++ b/content/commands/evalsha.md @@ -68,3 +68,17 @@ The server caches scripts by using the [`SCRIPT LOAD`]({{< relref "/commands/scr The command is otherwise identical to [`EVAL`]({{< relref "/commands/eval" >}}). Please refer to the [Redis Programmability]({{< relref "/develop/interact/programmability/" >}}) and [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}) for more information about Lua scripts. + +## Return information + +{{< multitabs id="evalsha-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the script that was executed. + +-tab-sep- + +The return value depends on the script that was executed. + +{{< /multitabs >}} diff --git a/content/commands/evalsha_ro.md b/content/commands/evalsha_ro.md index 4ecff77a2..3ded3ba26 100644 --- a/content/commands/evalsha_ro.md +++ b/content/commands/evalsha_ro.md @@ -67,3 +67,17 @@ This is a read-only variant of the [`EVALSHA`]({{< relref "/commands/evalsha" >} For more information about when to use this command vs [`EVALSHA`]({{< relref "/commands/evalsha" >}}), please refer to [Read-only scripts]({{< relref "develop/interact/programmability#read-only-scripts" >}}). For more information about [`EVALSHA`]({{< relref "/commands/evalsha" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}). + +## Return information + +{{< multitabs id="evalsha-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the script that was executed. + +-tab-sep- + +The return value depends on the script that was executed. + +{{< /multitabs >}} diff --git a/content/commands/exec.md b/content/commands/exec.md index c4df98baf..1cd5cb8d6 100644 --- a/content/commands/exec.md +++ b/content/commands/exec.md @@ -38,3 +38,21 @@ When using [`WATCH`]({{< relref "/commands/watch" >}}), `EXEC` will execute comm not modified, allowing for a [check-and-set mechanism][ttc]. [ttc]: /develop/interact/transactions#cas + +## Return information + +{{< multitabs id="exec-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): each element being the reply to each of the commands in the atomic transaction. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the transaction was aborted because a `WATCH`ed key was touched. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): each element being the reply to each of the commands in the atomic transaction. +* [Null reply](../../develop/reference/protocol-spec#nulls): the transaction was aborted because a `WATCH`ed key was touched. + +{{< /multitabs >}} diff --git a/content/commands/exists.md b/content/commands/exists.md index edf6c0598..a1faf8037 100644 --- a/content/commands/exists.md +++ b/content/commands/exists.md @@ -66,3 +66,16 @@ SET key2 "World" EXISTS key1 key2 nosuchkey {{% /redis-cli %}} +## Return information + +{{< multitabs id="exists-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that exist from those specified as arguments. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that exist from those specified as arguments. + +{{< /multitabs >}} diff --git a/content/commands/expire.md b/content/commands/expire.md index 12d09a187..3b3f66333 100644 --- a/content/commands/expire.md +++ b/content/commands/expire.md @@ -265,3 +265,21 @@ independently (but will wait for the [`DEL`]({{< relref "/commands/del" >}}) com still take the full state of the expires existing in the dataset, so when a replica is elected to master it will be able to expire the keys independently, fully acting as a master. + +## Return information + +{{< multitabs id="expire-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +{{< /multitabs >}} diff --git a/content/commands/expireat.md b/content/commands/expireat.md index 326b4a15c..8943c68bf 100644 --- a/content/commands/expireat.md +++ b/content/commands/expireat.md @@ -111,3 +111,20 @@ EXPIREAT mykey 1293840000 EXISTS mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="expireat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +{{< /multitabs >}} diff --git a/content/commands/expiretime.md b/content/commands/expiretime.md index ea17e698b..f8c3702c6 100644 --- a/content/commands/expiretime.md +++ b/content/commands/expiretime.md @@ -58,3 +58,22 @@ EXPIREAT mykey 33177117420 EXPIRETIME mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="expiretime-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the expiration Unix timestamp in seconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the expiration Unix timestamp in seconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/failover.md b/content/commands/failover.md index 2c5361b6e..e6493b46c 100644 --- a/content/commands/failover.md +++ b/content/commands/failover.md @@ -100,3 +100,17 @@ The command has no side effects if issued in the `waiting-for-sync` state but ca If a multi-master scenario is encountered, you will need to manually identify which master has the latest data and designate it as the master and have the other replicas. NOTE: [`REPLICAOF`]({{< relref "/commands/replicaof" >}}) is disabled while a failover is in progress, this is to prevent unintended interactions with the failover that might cause data loss. + +## Return information + +{{< multitabs id="failover-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a coordinated failover is in progress. An error if the operation cannot be executed. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a coordinated failover is in progress. An error if the operation cannot be executed. + +{{< /multitabs >}} diff --git a/content/commands/fcall.md b/content/commands/fcall.md index 2b9ff2c6c..3494b4181 100644 --- a/content/commands/fcall.md +++ b/content/commands/fcall.md @@ -91,3 +91,17 @@ redis> FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', func redis> FCALL myfunc 0 hello "hello" ``` + +## Return information + +{{< multitabs id="fcall-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the function that was executed. + +-tab-sep- + +The return value depends on the function that was executed. + +{{< /multitabs >}} diff --git a/content/commands/fcall_ro.md b/content/commands/fcall_ro.md index dd7bda14f..0cef2a52a 100644 --- a/content/commands/fcall_ro.md +++ b/content/commands/fcall_ro.md @@ -68,3 +68,17 @@ This is a read-only variant of the [`FCALL`]({{< relref "/commands/fcall" >}}) c For more information about when to use this command vs [`FCALL`]({{< relref "/commands/fcall" >}}), please refer to [Read-only scripts]({{< relref "develop/interact/programmability/#read-only_scripts" >}}). For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="fcall-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The return value depends on the function that was executed. + +-tab-sep- + +The return value depends on the function that was executed. + +{{< /multitabs >}} diff --git a/content/commands/flushall.md b/content/commands/flushall.md index 36ae58f68..b3e9bd027 100644 --- a/content/commands/flushall.md +++ b/content/commands/flushall.md @@ -74,4 +74,18 @@ FLUSHALL SYNC ## Behavior change history -* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive. +* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive. + +## Return information + +{{< multitabs id="flushall-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/flushdb.md b/content/commands/flushdb.md index 9ec88517d..f5cedb8df 100644 --- a/content/commands/flushdb.md +++ b/content/commands/flushdb.md @@ -71,3 +71,17 @@ It is possible to use one of the following modifiers to dictate the flushing mod ## Behavior change history * `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive. + +## Return information + +{{< multitabs id="flushdb-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/function-delete.md b/content/commands/function-delete.md index 3fa7295c8..3da46522b 100644 --- a/content/commands/function-delete.md +++ b/content/commands/function-delete.md @@ -54,3 +54,17 @@ OK redis> FCALL myfunc 0 (error) ERR Function not found ``` + +## Return information + +{{< multitabs id="function-delete-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/function-dump.md b/content/commands/function-dump.md index 8f12b3361..fa1fab680 100644 --- a/content/commands/function-dump.md +++ b/content/commands/function-dump.md @@ -58,3 +58,17 @@ redis> FUNCTION LIST 5) "flags" 6) (empty array) ``` + +## Return information + +{{< multitabs id="function-dump-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload + +{{< /multitabs >}} diff --git a/content/commands/function-flush.md b/content/commands/function-flush.md index c4d522a32..e151ad330 100644 --- a/content/commands/function-flush.md +++ b/content/commands/function-flush.md @@ -52,3 +52,17 @@ Unless called with the optional mode argument, the `lazyfree-lazy-user-flush` co * `SYNC`: Synchronously flush the libraries. For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="function-flush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/function-help.md b/content/commands/function-help.md index 1bd220456..520ae7316 100644 --- a/content/commands/function-help.md +++ b/content/commands/function-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: FUNCTION HELP --- The `FUNCTION HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="function-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/function-kill.md b/content/commands/function-kill.md index b8ae512ca..120afd60c 100644 --- a/content/commands/function-kill.md +++ b/content/commands/function-kill.md @@ -36,3 +36,17 @@ Kill a function that is currently executing. The `FUNCTION KILL` command can be used only on functions that did not modify the dataset during their execution (since stopping a read-only function does not violate the scripting engine's guaranteed atomicity). For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="function-kill-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/function-list.md b/content/commands/function-list.md index a85536ea8..21e4eb251 100644 --- a/content/commands/function-list.md +++ b/content/commands/function-list.md @@ -56,3 +56,17 @@ The following information is provided for each of the libraries in the response: * **library_code:** the library's source code (when given the `WITHCODE` modifier). For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="function-list-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): information about functions and libraries. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): information about functions and libraries. + +{{< /multitabs >}} diff --git a/content/commands/function-load.md b/content/commands/function-load.md index 5749a13d9..ba8fb25d7 100644 --- a/content/commands/function-load.md +++ b/content/commands/function-load.md @@ -73,3 +73,17 @@ mylib redis> FCALL myfunc 0 hello "hello" ``` + +## Return information + +{{< multitabs id="function-load-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the library name that was loaded. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the library name that was loaded. + +{{< /multitabs >}} diff --git a/content/commands/function-restore.md b/content/commands/function-restore.md index 13d4153c5..9da135b6c 100644 --- a/content/commands/function-restore.md +++ b/content/commands/function-restore.md @@ -63,3 +63,17 @@ The following policies are allowed: * **REPLACE:** appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries. For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="function-restore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/function-stats.md b/content/commands/function-stats.md index 920a1a1fa..a83e1b249 100644 --- a/content/commands/function-stats.md +++ b/content/commands/function-stats.md @@ -48,3 +48,17 @@ The reply is map with two keys: You can use this command to inspect the invocation of a long-running function and decide whether kill it with the [`FUNCTION KILL`]({{< relref "/commands/function-kill" >}}) command. For more information please refer to [Introduction to Redis Functions]({{< relref "/develop/interact/programmability/functions-intro" >}}). + +## Return information + +{{< multitabs id="function-stats-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): information about the function that's currently running and information about the available execution engines. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): information about the function that's currently running and information about the available execution engines. + +{{< /multitabs >}} diff --git a/content/commands/geoadd.md b/content/commands/geoadd.md index 4749de20c..b58f2d833 100644 --- a/content/commands/geoadd.md +++ b/content/commands/geoadd.md @@ -135,3 +135,16 @@ GEORADIUS Sicily 15 37 100 km GEORADIUS Sicily 15 37 200 km {{% /redis-cli %}} +## Return information + +{{< multitabs id="geoadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated). + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated). + +{{< /multitabs >}} diff --git a/content/commands/geodist.md b/content/commands/geodist.md index f599a1377..c570d7eb9 100644 --- a/content/commands/geodist.md +++ b/content/commands/geodist.md @@ -96,3 +96,20 @@ GEODIST Sicily Palermo Catania mi GEODIST Sicily Foo Bar {{% /redis-cli %}} +## Return information + +{{< multitabs id="geodist-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): one or both of the elements are missing. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): distance as a double (represented as a string) in the specified units. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): one or both of the elements are missing. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): distance as a double (represented as a string) in the specified units. + +{{< /multitabs >}} diff --git a/content/commands/geohash.md b/content/commands/geohash.md index fe507c2c1..8423c7eb9 100644 --- a/content/commands/geohash.md +++ b/content/commands/geohash.md @@ -77,3 +77,16 @@ GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" GEOHASH Sicily Palermo Catania {{% /redis-cli %}} +## Return information + +{{< multitabs id="geohash-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is the Geohash corresponding to each member name passed as an argument to the command. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is the Geohash corresponding to each member name passed as an argument to the command. + +{{< /multitabs >}} diff --git a/content/commands/geopos.md b/content/commands/geopos.md index d2d2a3af7..d96936573 100644 --- a/content/commands/geopos.md +++ b/content/commands/geopos.md @@ -63,3 +63,16 @@ GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" GEOPOS Sicily Palermo Catania NonExisting {{% /redis-cli %}} +## Return information + +{{< multitabs id="geopos-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Nil reply](../../develop/reference/protocol-spec#bulk-strings) elements of the array. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Null reply](../../develop/reference/protocol-spec#nulls) elements of the array. + +{{< /multitabs >}} diff --git a/content/commands/georadius.md b/content/commands/georadius.md index ca3b6d659..40dd8dea0 100644 --- a/content/commands/georadius.md +++ b/content/commands/georadius.md @@ -223,3 +223,30 @@ GEORADIUS Sicily 15 37 200 km WITHCOORD GEORADIUS Sicily 15 37 200 km WITHDIST WITHCOORD {{% /redis-cli %}} +## Return information + +{{< multitabs id="georadius-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + 1. The distance from the center as a floating point number, in the same unit specified in the radius. + 1. The Geohash integer. + 1. The coordinates as a two items x,y array (longitude,latitude). +For example, the command `GEORADIUS Sicily 15 37 200 km WITHCOORD WITHDIST` will return each item in the following way: +`["Palermo","190.4424",["13.361389338970184","38.115556395496299"]]` + +-tab-sep- + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + 1. The distance from the center as a floating point number, in the same unit specified in the radius. + 1. The Geohash integer. + 1. The coordinates as a two items x,y array (longitude,latitude). +For example, the command `GEORADIUS Sicily 15 37 200 km WITHCOORD WITHDIST` will return each item in the following way: +`["Palermo","190.4424",["13.361389338970184","38.115556395496299"]]` + +{{< /multitabs >}} diff --git a/content/commands/georadius_ro.md b/content/commands/georadius_ro.md index 6869de789..2e940b93b 100644 --- a/content/commands/georadius_ro.md +++ b/content/commands/georadius_ro.md @@ -133,3 +133,27 @@ title: GEORADIUS_RO Read-only variant of the [`GEORADIUS`]({{< relref "/commands/georadius" >}}) command. This command is identical to the [`GEORADIUS`]({{< relref "/commands/georadius" >}}) command, except that it doesn't support the optional `STORE` and `STOREDIST` parameters. + +## Return information + +{{< multitabs id="georadius-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +-tab-sep- + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +{{< /multitabs >}} diff --git a/content/commands/georadiusbymember.md b/content/commands/georadiusbymember.md index 712c56548..44b51814f 100644 --- a/content/commands/georadiusbymember.md +++ b/content/commands/georadiusbymember.md @@ -186,3 +186,26 @@ GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania" GEORADIUSBYMEMBER Sicily Agrigento 100 km {{% /redis-cli %}} +## Return information + +{{< multitabs id="georadiusbymember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +-tab-sep- + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +{{< /multitabs >}} diff --git a/content/commands/georadiusbymember_ro.md b/content/commands/georadiusbymember_ro.md index f30ec46d1..6f3cb43dc 100644 --- a/content/commands/georadiusbymember_ro.md +++ b/content/commands/georadiusbymember_ro.md @@ -129,3 +129,27 @@ title: GEORADIUSBYMEMBER_RO Read-only variant of the [`GEORADIUSBYMEMBER`]({{< relref "/commands/georadiusbymember" >}}) command. This command is identical to the [`GEORADIUSBYMEMBER`]({{< relref "/commands/georadiusbymember" >}}) command, except that it doesn't support the optional `STORE` and `STOREDIST` parameters. + +## Return information + +{{< multitabs id="georadiusbymember-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +-tab-sep- + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +{{< /multitabs >}} diff --git a/content/commands/geosearch.md b/content/commands/geosearch.md index 1b5ed2974..12e99eaf7 100644 --- a/content/commands/geosearch.md +++ b/content/commands/geosearch.md @@ -208,3 +208,26 @@ GEOSEARCH Sicily FROMLONLAT 15 37 BYRADIUS 200 km ASC GEOSEARCH Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST {{% /redis-cli %}} +## Return information + +{{< multitabs id="geosearch-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +-tab-sep- + +One of the following: +* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names +* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item: + * The distance from the center as a floating point number, in the same unit specified in the radius. + * The Geohash integer. + * The coordinates as a two items x,y array (longitude,latitude). + +{{< /multitabs >}} diff --git a/content/commands/geosearchstore.md b/content/commands/geosearchstore.md index 322c9b42e..d2fdfb5f0 100644 --- a/content/commands/geosearchstore.md +++ b/content/commands/geosearchstore.md @@ -197,3 +197,16 @@ GEOSEARCHSTORE key2 Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC COUNT 3 STOREDI ZRANGE key2 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="geosearchstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set + +{{< /multitabs >}} diff --git a/content/commands/get.md b/content/commands/get.md index 01d2cc897..025e5ea6e 100644 --- a/content/commands/get.md +++ b/content/commands/get.md @@ -63,3 +63,21 @@ GET mykey ### Code examples {{< clients-example set_and_get />}} + +## Return information + +{{< multitabs id="get-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key. +* [Null reply](../../develop/reference/protocol-spec#nulls): key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/getbit.md b/content/commands/getbit.md index 578cb473a..002f270a4 100644 --- a/content/commands/getbit.md +++ b/content/commands/getbit.md @@ -66,3 +66,20 @@ GETBIT mykey 7 GETBIT mykey 100 {{% /redis-cli %}} +## Return information + +{{< multitabs id="getbit-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +The bit value stored at _offset_, one of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0`. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1`. + +-tab-sep- + +The bit value stored at _offset_, one of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0`. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1`. + +{{< /multitabs >}} diff --git a/content/commands/getdel.md b/content/commands/getdel.md index cea297dc6..0e651dbc7 100644 --- a/content/commands/getdel.md +++ b/content/commands/getdel.md @@ -58,3 +58,20 @@ GETDEL mykey GET mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="getdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or if the key's value type is not a string. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or if the key's value type is not a string. + +{{< /multitabs >}} diff --git a/content/commands/getex.md b/content/commands/getex.md index 69cd65063..47471e2b6 100644 --- a/content/commands/getex.md +++ b/content/commands/getex.md @@ -97,3 +97,18 @@ GETEX mykey EX 60 TTL mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="getex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of `key` +[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if `key` does not exist. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of `key` +[Null reply](../../develop/reference/protocol-spec#nulls): if `key` does not exist. + +{{< /multitabs >}} diff --git a/content/commands/getrange.md b/content/commands/getrange.md index 6d5692a7d..d523ae494 100644 --- a/content/commands/getrange.md +++ b/content/commands/getrange.md @@ -72,3 +72,16 @@ GETRANGE mykey 0 -1 GETRANGE mykey 10 100 {{% /redis-cli %}} +## Return information + +{{< multitabs id="getrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The substring of the string value stored at key, determined by the offsets start and end (both are inclusive). + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The substring of the string value stored at key, determined by the offsets start and end (both are inclusive). + +{{< /multitabs >}} diff --git a/content/commands/getset.md b/content/commands/getset.md index 04ca705fe..efc3f1928 100644 --- a/content/commands/getset.md +++ b/content/commands/getset.md @@ -84,3 +84,20 @@ GETSET mykey "World" GET mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="getset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the old value stored at the key. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the old value stored at the key. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hdel.md b/content/commands/hdel.md index ea02ffdca..9b0703f98 100644 --- a/content/commands/hdel.md +++ b/content/commands/hdel.md @@ -69,3 +69,16 @@ HDEL myhash field1 HDEL myhash field2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="hdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were removed from the hash, excluding any specified but non-existing fields. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The number of fields that were removed from the hash, excluding any specified but non-existing fields. + +{{< /multitabs >}} diff --git a/content/commands/hello.md b/content/commands/hello.md index 147db937f..83233b8ad 100644 --- a/content/commands/hello.md +++ b/content/commands/hello.md @@ -116,3 +116,19 @@ protocol to the specified version and also accepts the following options: * `AUTH `: directly authenticate the connection in addition to switching to the specified protocol version. This makes calling [`AUTH`]({{< relref "/commands/auth" >}}) before `HELLO` unnecessary when setting up a new connection. Note that the `username` can be set to "default" to authenticate against a server that does not use ACLs, but rather the simpler `requirepass` mechanism of Redis prior to version 6. * `SETNAME `: this is the equivalent of calling [`CLIENT SETNAME`]({{< relref "/commands/client-setname" >}}). + +## Return information + +{{< multitabs id="hello-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties. +[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties. +[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hexists.md b/content/commands/hexists.md index b3b5932a3..8f596d363 100644 --- a/content/commands/hexists.md +++ b/content/commands/hexists.md @@ -58,3 +58,20 @@ HEXISTS myhash field1 HEXISTS myhash field2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="hexists-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the hash does not contain the field, or the key does not exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the hash contains the field. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the hash does not contain the field, or the key does not exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the hash contains the field. + +{{< /multitabs >}} diff --git a/content/commands/hexpire.md b/content/commands/hexpire.md index 12a36836e..ff88e0916 100644 --- a/content/commands/hexpire.md +++ b/content/commands/hexpire.md @@ -128,3 +128,32 @@ redis> HGETALL mykey (empty array) ``` +## Return information + +{{< multitabs id="hexpire-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX | XX | GT | LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE`/`HPEXPIRE` is called with 0 seconds/milliseconds or when `HEXPIREAT`/`HPEXPIREAT` is called with a past Unix time in seconds/milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX | XX | GT | LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE`/`HPEXPIRE` is called with 0 seconds/milliseconds or when `HEXPIREAT`/`HPEXPIREAT` is called with a past Unix time in seconds/milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +{{< /multitabs >}} diff --git a/content/commands/hexpireat.md b/content/commands/hexpireat.md index f8bf7fbf5..5dbc11e3a 100644 --- a/content/commands/hexpireat.md +++ b/content/commands/hexpireat.md @@ -115,3 +115,32 @@ redis> HTTL mykey FIELDS 2 field1 field2 2) (integer) 567 ``` +## Return information + +{{< multitabs id="hexpireat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +{{< /multitabs >}} diff --git a/content/commands/hexpiretime.md b/content/commands/hexpiretime.md index e618069e6..802f54a6c 100644 --- a/content/commands/hexpiretime.md +++ b/content/commands/hexpiretime.md @@ -74,3 +74,22 @@ redis> HEXPIRETIME mykey FIELDS 2 field1 field2 2) (integer) 1715705914 ``` +## Return information + +{{< multitabs id="hexpiretime-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in seconds. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in seconds. + +{{< /multitabs >}} diff --git a/content/commands/hget.md b/content/commands/hget.md index f4a105c21..65ef336f1 100644 --- a/content/commands/hget.md +++ b/content/commands/hget.md @@ -69,3 +69,21 @@ HSET myhash field1 "foo" HGET myhash field1 HGET myhash field2 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="hget-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value associated with the field. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): If the field is not present in the hash or key does not exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value associated with the field. +* [Null reply](../../develop/reference/protocol-spec#nulls): If the field is not present in the hash or key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hgetall.md b/content/commands/hgetall.md index 89e6d7709..bd0e85f4b 100644 --- a/content/commands/hgetall.md +++ b/content/commands/hgetall.md @@ -73,3 +73,16 @@ HSET myhash field2 "World" HGETALL myhash {{% /redis-cli %}} +## Return information + +{{< multitabs id="hgetall-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values, or an empty list when key does not exist. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a map of fields and their values, or an empty list when key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hgetdel.md b/content/commands/hgetdel.md index 93cadb98b..fc3d320e1 100644 --- a/content/commands/hgetdel.md +++ b/content/commands/hgetdel.md @@ -86,3 +86,17 @@ redis> HGETDEL mykey FIELDS 2 field1 field2 redis> KEYS * (empty array) ``` + +## Return information + +{{< multitabs id="hgetdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist. + +{{< /multitabs >}} diff --git a/content/commands/hgetex.md b/content/commands/hgetex.md index 355af773d..48468d8c7 100644 --- a/content/commands/hgetex.md +++ b/content/commands/hgetex.md @@ -126,3 +126,17 @@ redis> HTTL mykey FIELDS 3 field1 field2 redis> HGETALL mykey (empty array) ``` + +## Return information + +{{< multitabs id="hgetex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested. + +{{< /multitabs >}} diff --git a/content/commands/hincrby.md b/content/commands/hincrby.md index 5bdcef157..98a9aa608 100644 --- a/content/commands/hincrby.md +++ b/content/commands/hincrby.md @@ -76,3 +76,16 @@ HINCRBY myhash field -1 HINCRBY myhash field -10 {{% /redis-cli %}} +## Return information + +{{< multitabs id="hincrby-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation. + +{{< /multitabs >}} diff --git a/content/commands/hincrbyfloat.md b/content/commands/hincrbyfloat.md index 0dc64c35b..f947d9bb8 100644 --- a/content/commands/hincrbyfloat.md +++ b/content/commands/hincrbyfloat.md @@ -86,3 +86,17 @@ HINCRBYFLOAT mykey field 2.0e2 The command is always propagated in the replication link and the Append Only File as a [`HSET`]({{< relref "/commands/hset" >}}) operation, so that differences in the underlying floating point math implementation will not be sources of inconsistency. + +## Return information + +{{< multitabs id="hincrbyfloat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the field after the increment operation. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value of the field after the increment operation. + +{{< /multitabs >}} diff --git a/content/commands/hkeys.md b/content/commands/hkeys.md index 58621d054..5e867ce46 100644 --- a/content/commands/hkeys.md +++ b/content/commands/hkeys.md @@ -57,3 +57,16 @@ HSET myhash field2 "World" HKEYS myhash {{% /redis-cli %}} +## Return information + +{{< multitabs id="hkeys-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields in the hash, or an empty list when the key does not exist + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields in the hash, or an empty list when the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hlen.md b/content/commands/hlen.md index 42a37ee52..1df4fb24c 100644 --- a/content/commands/hlen.md +++ b/content/commands/hlen.md @@ -55,3 +55,16 @@ HSET myhash field2 "World" HLEN myhash {{% /redis-cli %}} +## Return information + +{{< multitabs id="hlen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields in the hash, or 0 when the key does not exist. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of the fields in the hash, or 0 when the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/hmget.md b/content/commands/hmget.md index cba317b15..82e3bd3f1 100644 --- a/content/commands/hmget.md +++ b/content/commands/hmget.md @@ -63,3 +63,16 @@ HSET myhash field2 "World" HMGET myhash field1 field2 nofield {{% /redis-cli %}} +## Return information + +{{< multitabs id="hmget-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested. + +{{< /multitabs >}} diff --git a/content/commands/hmset.md b/content/commands/hmset.md index 2e4af960b..ee9cedcec 100644 --- a/content/commands/hmset.md +++ b/content/commands/hmset.md @@ -75,3 +75,16 @@ HGET myhash field1 HGET myhash field2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="hmset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/hpersist.md b/content/commands/hpersist.md index bfbc83228..53cb87f32 100644 --- a/content/commands/hpersist.md +++ b/content/commands/hpersist.md @@ -79,3 +79,22 @@ redis> HTTL mykey FIELDS 2 field1 field2 2) (integer) -1 ``` +## Return information + +{{< multitabs id="hpersist-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` the expiration was removed. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` the expiration was removed. + +{{< /multitabs >}} diff --git a/content/commands/hpexpire.md b/content/commands/hpexpire.md index aa8ac086e..68001537d 100644 --- a/content/commands/hpexpire.md +++ b/content/commands/hpexpire.md @@ -109,3 +109,32 @@ redis> HGETALL mykey (empty array) ``` +## Return information + +{{< multitabs id="hpexpire-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +{{< /multitabs >}} diff --git a/content/commands/hpexpireat.md b/content/commands/hpexpireat.md index 0488edcf6..2d652f50c 100644 --- a/content/commands/hpexpireat.md +++ b/content/commands/hpexpireat.md @@ -111,3 +111,32 @@ redis> HPTTL mykey FIELDS 2 field1 field2 2) (integer) 303340 ``` +## Return information + +{{< multitabs id="hpexpireat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met. + - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated. + - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): + - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range. + - if the provided key exists but is not a hash. + +{{< /multitabs >}} diff --git a/content/commands/hpexpiretime.md b/content/commands/hpexpiretime.md index c27f63457..61dd1af8f 100644 --- a/content/commands/hpexpiretime.md +++ b/content/commands/hpexpiretime.md @@ -72,3 +72,22 @@ redis> HPEXPIRETIME mykey FIELDS 2 field1 field2 2) (integer) 1715705913659 ``` +## Return information + +{{< multitabs id="hpexpiretime-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in milliseconds. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in milliseconds. + +{{< /multitabs >}} diff --git a/content/commands/hpttl.md b/content/commands/hpttl.md index f4e2fc8b3..f71e6e429 100644 --- a/content/commands/hpttl.md +++ b/content/commands/hpttl.md @@ -76,3 +76,22 @@ redis> HPTTL mykey FIELDS 3 field1 field2 field3 3) (integer) -2 ``` +## Return information + +{{< multitabs id="hpttl-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in milliseconds. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in milliseconds. + +{{< /multitabs >}} diff --git a/content/commands/hrandfield.md b/content/commands/hrandfield.md index 1a131d6e1..8a9f88089 100644 --- a/content/commands/hrandfield.md +++ b/content/commands/hrandfield.md @@ -92,3 +92,25 @@ When the `count` is a negative value, the behavior changes as follows: * Repeating fields are possible. * Exactly `count` fields, or an empty array if the hash is empty (non-existing key), are always returned. * The order of fields in the reply is truly random. + +## Return information + +{{< multitabs id="hrandfield-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key doesn't exist +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a single, randomly selected field when the `count` option is not used +* [Array reply](../../develop/reference/protocol-spec#arrays): a list containing `count` fields when the `count` option is used, or an empty array if the key does not exists. +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values when `count` and `WITHVALUES` were both used. + +-tab-sep- + +Any of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key doesn't exist +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a single, randomly selected field when the `count` option is not used +* [Array reply](../../develop/reference/protocol-spec#arrays): a list containing `count` fields when the `count` option is used, or an empty array if the key does not exists. +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values when `count` and `WITHVALUES` were both used. + +{{< /multitabs >}} diff --git a/content/commands/hscan.md b/content/commands/hscan.md index b6d1c7d04..2d6d2c292 100644 --- a/content/commands/hscan.md +++ b/content/commands/hscan.md @@ -68,3 +68,21 @@ syntax_str: "cursor [MATCH\_pattern] [COUNT\_count] [NOVALUES]" title: HSCAN --- See [`SCAN`]({{< relref "/commands/scan" >}}) for `HSCAN` documentation. + +## Return information + +{{< multitabs id="hscan-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a two-element array. +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a two-element array. +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned. + +{{< /multitabs >}} diff --git a/content/commands/hset.md b/content/commands/hset.md index eb440d9b1..3c32ffaf1 100644 --- a/content/commands/hset.md +++ b/content/commands/hset.md @@ -97,4 +97,18 @@ HSET myhash field2 "Hi" field3 "World" HGET myhash field2 HGET myhash field3 HGETALL myhash -{{% /redis-cli %}} \ No newline at end of file +{{% /redis-cli %}} + +## Return information + +{{< multitabs id="hset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added. + +{{< /multitabs >}} diff --git a/content/commands/hsetex.md b/content/commands/hsetex.md index f50f3a51a..4ffa80c5b 100644 --- a/content/commands/hsetex.md +++ b/content/commands/hsetex.md @@ -141,3 +141,21 @@ redis> HTTL mykey FIELDS 2 field1 field2 1) (integer) 55481 2) (integer) 55481 ``` + +## Return information + +{{< multitabs id="hsetex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset. + +{{< /multitabs >}} diff --git a/content/commands/hsetnx.md b/content/commands/hsetnx.md index c7fd5d2b3..31b2e7ce6 100644 --- a/content/commands/hsetnx.md +++ b/content/commands/hsetnx.md @@ -66,3 +66,20 @@ HSETNX myhash field "World" HGET myhash field {{% /redis-cli %}} +## Return information + +{{< multitabs id="hsetnx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the field is a new field in the hash and the value was set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the field is a new field in the hash and the value was set. + +{{< /multitabs >}} diff --git a/content/commands/hstrlen.md b/content/commands/hstrlen.md index 6646e3aed..94379c274 100644 --- a/content/commands/hstrlen.md +++ b/content/commands/hstrlen.md @@ -59,3 +59,16 @@ HSTRLEN myhash f2 HSTRLEN myhash f3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="hstrlen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the string length of the value associated with the _field_, or zero when the _field_ isn't present in the hash or the _key_ doesn't exist at all. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the string length of the value associated with the _field_, or zero when the _field_ isn't present in the hash or the _key_ doesn't exist at all. + +{{< /multitabs >}} diff --git a/content/commands/httl.md b/content/commands/httl.md index 01ef43812..bb356274f 100644 --- a/content/commands/httl.md +++ b/content/commands/httl.md @@ -79,3 +79,22 @@ redis> HTTL mykey FIELDS 3 field1 field2 field3 3) (integer) -2 ``` +## Return information + +{{< multitabs id="httl-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in seconds. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays). For each field: + - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist. + - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set. + - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in seconds. + +{{< /multitabs >}} diff --git a/content/commands/hvals.md b/content/commands/hvals.md index 99e10d1a1..8bf6739ed 100644 --- a/content/commands/hvals.md +++ b/content/commands/hvals.md @@ -69,3 +69,16 @@ HSET myhash field2 "World" HVALS myhash {{% /redis-cli %}} +## Return information + +{{< multitabs id="hvals-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values in the hash, or an empty list when the key does not exist + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values in the hash, or an empty list when the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/incr.md b/content/commands/incr.md index bb694861a..196ff3ac1 100644 --- a/content/commands/incr.md +++ b/content/commands/incr.md @@ -220,3 +220,17 @@ false but the key may be created by another client before we create it inside the [`MULTI`]({{< relref "/commands/multi" >}}) / [`EXEC`]({{< relref "/commands/exec" >}}) block. However this race will just miss an API call under rare conditions, so the rate limiting will still work correctly. + +## Return information + +{{< multitabs id="incr-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment. + +{{< /multitabs >}} diff --git a/content/commands/incrby.md b/content/commands/incrby.md index c1a71d081..9be5957b7 100644 --- a/content/commands/incrby.md +++ b/content/commands/incrby.md @@ -68,3 +68,16 @@ SET mykey "10" INCRBY mykey 5 {{% /redis-cli %}} +## Return information + +{{< multitabs id="incrby-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment. + +{{< /multitabs >}} diff --git a/content/commands/incrbyfloat.md b/content/commands/incrbyfloat.md index 7a0ddc7f5..8d28d67ab 100644 --- a/content/commands/incrbyfloat.md +++ b/content/commands/incrbyfloat.md @@ -94,3 +94,17 @@ INCRBYFLOAT mykey 2.0e2 The command is always propagated in the replication link and the Append Only File as a [`SET`]({{< relref "/commands/set" >}}) operation, so that differences in the underlying floating point math implementation will not be sources of inconsistency. + +## Return information + +{{< multitabs id="incrbyfloat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key after the increment. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key after the increment. + +{{< /multitabs >}} diff --git a/content/commands/info.md b/content/commands/info.md index 705dcad99..acfee239f 100644 --- a/content/commands/info.md +++ b/content/commands/info.md @@ -617,4 +617,20 @@ Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB o For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. The last term, "+ 5KB", is the size of the shared content. -For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key. \ No newline at end of file +For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key. + +## Return information + +{{< multitabs id="info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a map of info fields, one field per line in the form of `:` where the value can be a comma separated map like `=`. Also contains section header lines starting with `#` and blank lines. +Lines can contain a section name (starting with a `#` character) or a property. All the properties are in the form of `field:value` terminated by `\r\n`. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a map of info fields, one field per line in the form of `:` where the value can be a comma separated map like `=`. Also contains section header lines starting with `#` and blank lines. +Lines can contain a section name (starting with a `#` character) or a property. All the properties are in the form of `field:value` terminated by `\r\n`. + +{{< /multitabs >}} diff --git a/content/commands/keys.md b/content/commands/keys.md index aee2776a1..f46fd3368 100644 --- a/content/commands/keys.md +++ b/content/commands/keys.md @@ -78,3 +78,16 @@ KEYS a?? KEYS * {{% /redis-cli %}} +## Return information + +{{< multitabs id="keys-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys matching _pattern_. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys matching _pattern_. + +{{< /multitabs >}} diff --git a/content/commands/lastsave.md b/content/commands/lastsave.md index 0772e1d65..9c12ef589 100644 --- a/content/commands/lastsave.md +++ b/content/commands/lastsave.md @@ -35,3 +35,17 @@ Return the UNIX TIME of the last DB save executed with success. A client may check if a [`BGSAVE`]({{< relref "/commands/bgsave" >}}) command succeeded reading the `LASTSAVE` value, then issuing a [`BGSAVE`]({{< relref "/commands/bgsave" >}}) command and checking at regular intervals every N seconds if `LASTSAVE` changed. Redis considers the database saved successfully at startup. + +## Return information + +{{< multitabs id="lastsave-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): UNIX TIME of the last DB save executed with success. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): UNIX TIME of the last DB save executed with success. + +{{< /multitabs >}} diff --git a/content/commands/latency-doctor.md b/content/commands/latency-doctor.md index c4ce9cfc4..65184ae73 100644 --- a/content/commands/latency-doctor.md +++ b/content/commands/latency-doctor.md @@ -75,3 +75,17 @@ I have a few advices for you: For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-doctor-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a human readable latency analysis report. + +-tab-sep- + +[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a human readable latency analysis report. + +{{< /multitabs >}} diff --git a/content/commands/latency-graph.md b/content/commands/latency-graph.md index 826a0e4a7..5e03893fb 100644 --- a/content/commands/latency-graph.md +++ b/content/commands/latency-graph.md @@ -98,3 +98,17 @@ in the lower row) is the minimum, and a # in the higher row is the maximum. For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-graph-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Latency graph + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Latency graph + +{{< /multitabs >}} diff --git a/content/commands/latency-help.md b/content/commands/latency-help.md index c3ed1d5df..c50562e54 100644 --- a/content/commands/latency-help.md +++ b/content/commands/latency-help.md @@ -32,3 +32,17 @@ subcommands. For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/latency-histogram.md b/content/commands/latency-histogram.md index 6f21f569e..8a8358305 100644 --- a/content/commands/latency-histogram.md +++ b/content/commands/latency-histogram.md @@ -77,3 +77,17 @@ To delete the latency histograms' data use the [`CONFIG RESETSTAT`]({{< relref " 5# (integer) 16 => (integer) 99968 6# (integer) 33 => (integer) 100000 ``` + +## Return information + +{{< multitabs id="latency-histogram-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): a map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets. + +{{< /multitabs >}} diff --git a/content/commands/latency-history.md b/content/commands/latency-history.md index 7cec27277..204cd27fd 100644 --- a/content/commands/latency-history.md +++ b/content/commands/latency-history.md @@ -75,3 +75,17 @@ Valid values for `event` are: For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-history-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a two elements array representing the timestamp and the latency of the event. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a two elements array representing the timestamp and the latency of the event. + +{{< /multitabs >}} diff --git a/content/commands/latency-latest.md b/content/commands/latency-latest.md index e17e42f11..72074e4b4 100644 --- a/content/commands/latency-latest.md +++ b/content/commands/latency-latest.md @@ -64,3 +64,17 @@ OK For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-latest-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements. + +{{< /multitabs >}} diff --git a/content/commands/latency-reset.md b/content/commands/latency-reset.md index 8da989d1e..432fa1b5e 100644 --- a/content/commands/latency-reset.md +++ b/content/commands/latency-reset.md @@ -69,3 +69,17 @@ Valid values for `event` are: For more information refer to the [Latency Monitoring Framework page][lm]. [lm]: /operate/oss_and_stack/management/optimization/latency-monitor.md + +## Return information + +{{< multitabs id="latency-reset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of event time series that were reset. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of event time series that were reset. + +{{< /multitabs >}} diff --git a/content/commands/lcs.md b/content/commands/lcs.md index f6b587a88..043dae88e 100644 --- a/content/commands/lcs.md +++ b/content/commands/lcs.md @@ -141,3 +141,23 @@ Finally to also have the match len: 3) "len" 4) (integer) 6 ``` + +## Return information + +{{< multitabs id="lcs-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the longest common subsequence. +* [Integer reply](../../develop/reference/protocol-spec#integers): the length of the longest common subsequence when _LEN_ is given. +* [Array reply](../../develop/reference/protocol-spec#arrays): an array with the LCS length and all the ranges in both the strings when _IDX_ is given. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the longest common subsequence. +* [Integer reply](../../develop/reference/protocol-spec#integers): the length of the longest common subsequence when _LEN_ is given. +* [Map reply](../../develop/reference/protocol-spec#maps): a map with the LCS length and all the ranges in both the strings when _IDX_ is given. + +{{< /multitabs >}} diff --git a/content/commands/lindex.md b/content/commands/lindex.md index d17f24afe..fa178e10f 100644 --- a/content/commands/lindex.md +++ b/content/commands/lindex.md @@ -68,3 +68,20 @@ LINDEX mylist -1 LINDEX mylist 3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lindex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when _index_ is out of range. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the requested element. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when _index_ is out of range. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the requested element. + +{{< /multitabs >}} diff --git a/content/commands/linsert.md b/content/commands/linsert.md index a543fd4a0..81bad796e 100644 --- a/content/commands/linsert.md +++ b/content/commands/linsert.md @@ -82,3 +82,22 @@ LINSERT mylist BEFORE "World" "There" LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="linsert-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the list length after a successful insert operation. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when the key doesn't exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` when the pivot wasn't found. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the list length after a successful insert operation. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when the key doesn't exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` when the pivot wasn't found. + +{{< /multitabs >}} diff --git a/content/commands/llen.md b/content/commands/llen.md index 1573e29bc..181d9ef55 100644 --- a/content/commands/llen.md +++ b/content/commands/llen.md @@ -68,3 +68,16 @@ LPUSH mylist "Hello" LLEN mylist {{% /redis-cli %}} +## Return information + +{{< multitabs id="llen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list. + +{{< /multitabs >}} diff --git a/content/commands/lmove.md b/content/commands/lmove.md index 9abba740c..84c9c1cbb 100644 --- a/content/commands/lmove.md +++ b/content/commands/lmove.md @@ -165,3 +165,17 @@ reachable, with the smallest delay possible, using a number of parallel workers. Note that this implementation of workers is trivially scalable and reliable, because even if a message is lost the item is still in the queue and will be processed at the next iteration. + +## Return information + +{{< multitabs id="lmove-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed. + +{{< /multitabs >}} diff --git a/content/commands/lmpop.md b/content/commands/lmpop.md index 6cb5b573e..f430ad343 100644 --- a/content/commands/lmpop.md +++ b/content/commands/lmpop.md @@ -99,3 +99,20 @@ LMPOP 2 mylist mylist2 right count 10 EXISTS mylist mylist2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lmpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped and the second element being an array of elements. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped and the second element being an array of elements. + +{{< /multitabs >}} diff --git a/content/commands/lolwut.md b/content/commands/lolwut.md index 7f12f7255..a7622ed1b 100644 --- a/content/commands/lolwut.md +++ b/content/commands/lolwut.md @@ -57,3 +57,17 @@ LOLWUT version should have the following properties: 3. LOLWUT output should be fast to generate so that the command can be called in production instances without issues. It should remain fast even when the user experiments with odd parameters. 4. LOLWUT implementations should be safe and carefully checked for security, and resist to untrusted inputs if they take arguments. 5. LOLWUT must always display the Redis version at the end. + +## Return information + +{{< multitabs id="lolwut-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a string containing generative computer art and the Redis version. + +-tab-sep- + +[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a string containing generative computer art and the Redis version. + +{{< /multitabs >}} diff --git a/content/commands/lpop.md b/content/commands/lpop.md index 61c8c6780..fee1aed1a 100644 --- a/content/commands/lpop.md +++ b/content/commands/lpop.md @@ -87,3 +87,22 @@ LPOP mylist 2 LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the first element. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the first element. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements. + +{{< /multitabs >}} diff --git a/content/commands/lpos.md b/content/commands/lpos.md index 3c4a69f3a..adb825d55 100644 --- a/content/commands/lpos.md +++ b/content/commands/lpos.md @@ -132,3 +132,22 @@ LPOS mylist 3 LPOS mylist 3 COUNT 0 RANK 2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lpos-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if there is no matching element. +* [Integer reply](../../develop/reference/protocol-spec#integers): an integer representing the matching element. +* [Array reply](../../develop/reference/protocol-spec#arrays): If the COUNT option is given, an array of integers representing the matching elements (or an empty array if there are no matches). + +-tab-sep- + +Any of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if there is no matching element. +* [Integer reply](../../develop/reference/protocol-spec#integers): an integer representing the matching element. +* [Array reply](../../develop/reference/protocol-spec#arrays): If the COUNT option is given, an array of integers representing the matching elements (or an empty array if there are no matches). + +{{< /multitabs >}} diff --git a/content/commands/lpush.md b/content/commands/lpush.md index 339d5dfab..f60ece993 100644 --- a/content/commands/lpush.md +++ b/content/commands/lpush.md @@ -86,3 +86,17 @@ LPUSH mylist "world" LPUSH mylist "hello" LRANGE mylist 0 -1 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="lpush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +{{< /multitabs >}} diff --git a/content/commands/lpushx.md b/content/commands/lpushx.md index ec80cdfc0..07db974b9 100644 --- a/content/commands/lpushx.md +++ b/content/commands/lpushx.md @@ -70,3 +70,16 @@ LRANGE mylist 0 -1 LRANGE myotherlist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lpushx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +{{< /multitabs >}} diff --git a/content/commands/lrange.md b/content/commands/lrange.md index 14c361e7f..fb0abd25b 100644 --- a/content/commands/lrange.md +++ b/content/commands/lrange.md @@ -112,3 +112,17 @@ LRANGE mylist -3 2 LRANGE mylist -100 100 LRANGE mylist 5 10 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="lrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified range, or an empty array if the key doesn't exist. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified range, or an empty array if the key doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/lrem.md b/content/commands/lrem.md index 83ea8fee6..26f1fbf8f 100644 --- a/content/commands/lrem.md +++ b/content/commands/lrem.md @@ -78,3 +78,16 @@ LREM mylist -2 "hello" LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lrem-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of removed elements. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of removed elements. + +{{< /multitabs >}} diff --git a/content/commands/lset.md b/content/commands/lset.md index e269f1546..0d9672ead 100644 --- a/content/commands/lset.md +++ b/content/commands/lset.md @@ -69,3 +69,16 @@ LSET mylist -2 "five" LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="lset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/ltrim.md b/content/commands/ltrim.md index 72c8acc84..8ac353782 100644 --- a/content/commands/ltrim.md +++ b/content/commands/ltrim.md @@ -96,3 +96,16 @@ LTRIM mylist 1 -1 LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="ltrim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/memory-doctor.md b/content/commands/memory-doctor.md index fc7bcd0c2..e9519e432 100644 --- a/content/commands/memory-doctor.md +++ b/content/commands/memory-doctor.md @@ -29,3 +29,17 @@ title: MEMORY DOCTOR --- The `MEMORY DOCTOR` command reports about different memory-related issues that the Redis server experiences, and advises about possible remedies. + +## Return information + +{{< multitabs id="memory-doctor-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a memory problems report. + +-tab-sep- + +[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a memory problems report. + +{{< /multitabs >}} diff --git a/content/commands/memory-help.md b/content/commands/memory-help.md index 79c6cf5f5..9b6561e99 100644 --- a/content/commands/memory-help.md +++ b/content/commands/memory-help.md @@ -28,3 +28,17 @@ title: MEMORY HELP --- The `MEMORY HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="memory-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/memory-purge.md b/content/commands/memory-purge.md index 93fd9757b..74b350b9b 100644 --- a/content/commands/memory-purge.md +++ b/content/commands/memory-purge.md @@ -31,3 +31,17 @@ reclaimed by the allocator. This command is currently implemented only when using **jemalloc** as an allocator, and evaluates to a benign NOOP for all others. + +## Return information + +{{< multitabs id="memory-purge-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/memory-stats.md b/content/commands/memory-stats.md index d65b06cbc..dc59a58f8 100644 --- a/content/commands/memory-stats.md +++ b/content/commands/memory-stats.md @@ -84,3 +84,17 @@ values. The following metrics are reported: * `fragmentation.bytes`: See [`INFO`]({{< relref "/commands/info" >}})'s `mem_fragmentation_bytes` **A note about the word slave used in this man page**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated. + +## Return information + +{{< multitabs id="memory-stats-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of memory usage metrics and their values. + +-tab-sep- + +[Map reply](../../develop/reference/protocol-spec#maps): memory usage metrics and their values. + +{{< /multitabs >}} diff --git a/content/commands/memory-usage.md b/content/commands/memory-usage.md index 6038cc87e..aff92a98a 100644 --- a/content/commands/memory-usage.md +++ b/content/commands/memory-usage.md @@ -94,4 +94,22 @@ OK |:----------------------|:-----------------|:------| |✅ Standard
✅ Active-Active | ✅ Standard
✅ Active-Active | Not supported for [scripts]({{}}) in Redis versions earlier than 7. | -Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead. \ No newline at end of file +Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead. + +## Return information + +{{< multitabs id="memory-usage-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the memory usage in bytes. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the memory usage in bytes. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/mget.md b/content/commands/mget.md index f035e3667..ac5f6a454 100644 --- a/content/commands/mget.md +++ b/content/commands/mget.md @@ -62,3 +62,16 @@ SET key2 "World" MGET key1 key2 nonexisting {{% /redis-cli %}} +## Return information + +{{< multitabs id="mget-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values at the specified keys. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of values at the specified keys. + +{{< /multitabs >}} diff --git a/content/commands/migrate.md b/content/commands/migrate.md index 89d5222be..5fa868c81 100644 --- a/content/commands/migrate.md +++ b/content/commands/migrate.md @@ -204,3 +204,21 @@ just a single key exists. * `KEYS` -- If the key argument is an empty string, the command will instead migrate all the keys that follow the `KEYS` option (see the above section for more info). * `AUTH` -- Authenticate with the given password to the remote instance. * `AUTH2` -- Authenticate with the given username and password pair (Redis 6 or greater ACL auth style). + +## Return information + +{{< multitabs id="migrate-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `NOKEY` when no keys were found in the source instance. + +-tab-sep- + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success. +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `NOKEY` when no keys were found in the source instance. + +{{< /multitabs >}} diff --git a/content/commands/module-help.md b/content/commands/module-help.md index 12d77981d..fed91059d 100644 --- a/content/commands/module-help.md +++ b/content/commands/module-help.md @@ -27,3 +27,17 @@ syntax_str: '' title: MODULE HELP --- The `MODULE HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="module-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions + +{{< /multitabs >}} diff --git a/content/commands/module-list.md b/content/commands/module-list.md index 9f7712fb6..d12462196 100644 --- a/content/commands/module-list.md +++ b/content/commands/module-list.md @@ -31,3 +31,21 @@ syntax_str: '' title: MODULE LIST --- Returns information about the modules loaded to the server. + +## Return information + +{{< multitabs id="module-list-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): list of loaded modules. Each element in the list represents a represents a module, and is in itself a list of property names and their values. The following properties is reported for each loaded module: +* name: the name of the module. +* ver: the version of the module. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): list of loaded modules. Each element in the list represents a represents a module, and is a [Map reply](../../develop/reference/protocol-spec#maps) of property names and their values. The following properties is reported for each loaded module: +* name: the name of the module. +* ver: the version of the module. + +{{< /multitabs >}} diff --git a/content/commands/module-load.md b/content/commands/module-load.md index 60fc7e442..09c4abfe8 100644 --- a/content/commands/module-load.md +++ b/content/commands/module-load.md @@ -50,4 +50,18 @@ configuration directive in `redis.conf`. {{< note >}} As of Redis 8 in Redis Open Source, loading a module using the Redis CLI with configuration parameters is deprecated. -{{< /note >}} \ No newline at end of file +{{< /note >}} + +## Return information + +{{< multitabs id="module-load-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded. + +{{< /multitabs >}} diff --git a/content/commands/module-loadex.md b/content/commands/module-loadex.md index 3f43d0606..fd461c834 100644 --- a/content/commands/module-loadex.md +++ b/content/commands/module-loadex.md @@ -64,3 +64,17 @@ Any additional arguments that follow the `ARGS` keyword are passed unmodified to **Note**: modules can also be loaded at server startup with `loadmodule` configuration directive in `redis.conf`. + +## Return information + +{{< multitabs id="module-loadex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded. + +{{< /multitabs >}} diff --git a/content/commands/module-unload.md b/content/commands/module-unload.md index 631a75e37..b5f967200 100644 --- a/content/commands/module-unload.md +++ b/content/commands/module-unload.md @@ -42,3 +42,17 @@ library's filename. Known limitations: * Modules that register custom data types can not be unloaded. + +## Return information + +{{< multitabs id="module-unload-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was unloaded. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was unloaded. + +{{< /multitabs >}} diff --git a/content/commands/monitor.md b/content/commands/monitor.md index 72dc149e0..f0b4a7e1d 100644 --- a/content/commands/monitor.md +++ b/content/commands/monitor.md @@ -115,4 +115,18 @@ Running more `MONITOR` clients will reduce throughput even more. * `>= 6.0.0`: [`AUTH`]({{< relref "/commands/auth" >}}) excluded from the command's output. * `>= 6.2.0`: "[`RESET`]({{< relref "/commands/reset" >}}) can be called to exit monitor mode. -* `>= 6.2.4`: "[`AUTH`]({{< relref "/commands/auth" >}}), [`HELLO`]({{< relref "/commands/hello" >}}), [`EVAL`]({{< relref "/commands/eval" >}}), [`EVAL_RO`]({{< relref "/commands/eval_ro" >}}), [`EVALSHA`]({{< relref "/commands/evalsha" >}}) and [`EVALSHA_RO`]({{< relref "/commands/evalsha_ro" >}}) included in the command's output. \ No newline at end of file +* `>= 6.2.4`: "[`AUTH`]({{< relref "/commands/auth" >}}), [`HELLO`]({{< relref "/commands/hello" >}}), [`EVAL`]({{< relref "/commands/eval" >}}), [`EVAL_RO`]({{< relref "/commands/eval_ro" >}}), [`EVALSHA`]({{< relref "/commands/evalsha" >}}) and [`EVALSHA_RO`]({{< relref "/commands/evalsha_ro" >}}) included in the command's output. + +## Return information + +{{< multitabs id="monitor-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +**Non-standard return value**. Dumps the received commands in an infinite flow. + +-tab-sep- + +**Non-standard return value**. Dumps the received commands in an infinite flow. + +{{< /multitabs >}} diff --git a/content/commands/move.md b/content/commands/move.md index bbb6761f3..b3310b430 100644 --- a/content/commands/move.md +++ b/content/commands/move.md @@ -55,3 +55,21 @@ destination database. When `key` already exists in the destination database, or it does not exist in the source database, it does nothing. It is possible to use `MOVE` as a locking primitive because of this. + +## Return information + +{{< multitabs id="move-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was moved. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ wasn't moved. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was moved. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ wasn't moved. + +{{< /multitabs >}} diff --git a/content/commands/mset.md b/content/commands/mset.md index d82a2b946..6de994e85 100644 --- a/content/commands/mset.md +++ b/content/commands/mset.md @@ -72,3 +72,16 @@ GET key1 GET key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="mset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): always `OK` because `MSET` can't fail. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): always `OK` because `MSET` can't fail. + +{{< /multitabs >}} diff --git a/content/commands/msetnx.md b/content/commands/msetnx.md index 61f59e0be..5912c59b0 100644 --- a/content/commands/msetnx.md +++ b/content/commands/msetnx.md @@ -75,3 +75,20 @@ MSETNX key2 "new" key3 "world" MGET key1 key2 key3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="msetnx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no key was set (at least one key already existed). +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the keys were set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no key was set (at least one key already existed). +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the keys were set. + +{{< /multitabs >}} diff --git a/content/commands/multi.md b/content/commands/multi.md index 7b1f7af56..4519f834b 100644 --- a/content/commands/multi.md +++ b/content/commands/multi.md @@ -34,3 +34,17 @@ Marks the start of a [transaction][tt] block. Subsequent commands will be queued for atomic execution using [`EXEC`]({{< relref "/commands/exec" >}}). [tt]: /develop/interact/transactions + +## Return information + +{{< multitabs id="multi-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/object-encoding.md b/content/commands/object-encoding.md index 3f51e1b9c..bcc31c5f6 100644 --- a/content/commands/object-encoding.md +++ b/content/commands/object-encoding.md @@ -88,3 +88,21 @@ Redis objects can be encoded in different ways: - `stream`, encoded as a radix tree of listpacks. All the specially encoded types are automatically converted to the general type once you perform an operation that makes it impossible for Redis to retain the space saving encoding. + +## Return information + +{{< multitabs id="object-encoding-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key doesn't exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the encoding of the object. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key doesn't exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the encoding of the object. + +{{< /multitabs >}} diff --git a/content/commands/object-freq.md b/content/commands/object-freq.md index 5dffe6d3e..53d64b079 100644 --- a/content/commands/object-freq.md +++ b/content/commands/object-freq.md @@ -49,3 +49,21 @@ title: OBJECT FREQ This command returns the logarithmic access frequency counter of a Redis object stored at ``. The command is only available when the `maxmemory-policy` configuration directive is set to one of the LFU policies. + +## Return information + +{{< multitabs id="object-freq-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the counter's value. +[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist. + +-tab-sep- + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the counter's value. +[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/object-help.md b/content/commands/object-help.md index cf13bcd86..4d6a9b45a 100644 --- a/content/commands/object-help.md +++ b/content/commands/object-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: OBJECT HELP --- The `OBJECT HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="object-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/object-idletime.md b/content/commands/object-idletime.md index 6c7589881..ec9b534b3 100644 --- a/content/commands/object-idletime.md +++ b/content/commands/object-idletime.md @@ -49,3 +49,21 @@ title: OBJECT IDLETIME This command returns the time in seconds since the last access to the value stored at ``. The command is only available when the `maxmemory-policy` configuration directive is not set to one of the LFU policies. + +## Return information + +{{< multitabs id="object-idletime-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds. +[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist. + +-tab-sep- + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds. +[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/object-refcount.md b/content/commands/object-refcount.md index 84412f707..4fb91b60b 100644 --- a/content/commands/object-refcount.md +++ b/content/commands/object-refcount.md @@ -47,3 +47,21 @@ syntax_str: '' title: OBJECT REFCOUNT --- This command returns the reference count of the stored at ``. + +## Return information + +{{< multitabs id="object-refcount-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the number of references. +[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist. + +-tab-sep- + +One of the following: +[Integer reply](../../develop/reference/protocol-spec#integers): the number of references. +[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/persist.md b/content/commands/persist.md index 9b0f61e1d..2b5f668d7 100644 --- a/content/commands/persist.md +++ b/content/commands/persist.md @@ -60,3 +60,20 @@ PERSIST mykey TTL mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="persist-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ does not exist or does not have an associated timeout. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout has been removed. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ does not exist or does not have an associated timeout. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout has been removed. + +{{< /multitabs >}} diff --git a/content/commands/pexpire.md b/content/commands/pexpire.md index 4c6cc1afa..49eb57fcc 100644 --- a/content/commands/pexpire.md +++ b/content/commands/pexpire.md @@ -101,3 +101,20 @@ PEXPIRE mykey 1000 NX TTL mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="pexpire-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0`if the timeout was not set. For example, if the key doesn't exist, or the operation skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0`if the timeout was not set. For example, if the key doesn't exist, or the operation skipped because of the provided arguments. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. + +{{< /multitabs >}} diff --git a/content/commands/pexpireat.md b/content/commands/pexpireat.md index 325740b6e..64b4d0080 100644 --- a/content/commands/pexpireat.md +++ b/content/commands/pexpireat.md @@ -97,3 +97,20 @@ TTL mykey PTTL mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="pexpireat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set. For example, if the key doesn't exist, or the operation was skipped due to the provided arguments. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set. For example, if the key doesn't exist, or the operation was skipped due to the provided arguments. + +{{< /multitabs >}} diff --git a/content/commands/pexpiretime.md b/content/commands/pexpiretime.md index d3f764abe..7141930c5 100644 --- a/content/commands/pexpiretime.md +++ b/content/commands/pexpiretime.md @@ -56,3 +56,22 @@ PEXPIREAT mykey 33177117420000 PEXPIRETIME mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="pexpiretime-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): Expiration Unix timestamp in milliseconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): Expiration Unix timestamp in milliseconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/pfadd.md b/content/commands/pfadd.md index 309e4b82a..d4030ed22 100644 --- a/content/commands/pfadd.md +++ b/content/commands/pfadd.md @@ -69,3 +69,20 @@ PFADD hll a b c d e f g PFCOUNT hll {{% /redis-cli %}} +## Return information + +{{< multitabs id="pfadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if at least one HyperLogLog internal register was altered. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no HyperLogLog internal registers were altered. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if at least one HyperLogLog internal register was altered. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no HyperLogLog internal registers were altered. + +{{< /multitabs >}} diff --git a/content/commands/pfcount.md b/content/commands/pfcount.md index 01b4f412c..4483b911d 100644 --- a/content/commands/pfcount.md +++ b/content/commands/pfcount.md @@ -108,3 +108,17 @@ The HyperLogLog, being a Redis string, can be retrieved with [`GET`]({{< relref The representation is neutral from the point of view of the processor word size and endianness, so the same representation is used by 32 bit and 64 bit processor, big endian or little endian. More details about the Redis HyperLogLog implementation can be found in [this blog post](http://antirez.com/news/75). The source code of the implementation in the `hyperloglog.c` file is also easy to read and understand, and includes a full specification for the exact encoding used for the sparse and dense representations. + +## Return information + +{{< multitabs id="pfcount-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the approximated number of unique elements observed via `PFADD`. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the approximated number of unique elements observed via `PFADD` + +{{< /multitabs >}} diff --git a/content/commands/pfmerge.md b/content/commands/pfmerge.md index 0f925e731..880cd7b6a 100644 --- a/content/commands/pfmerge.md +++ b/content/commands/pfmerge.md @@ -85,3 +85,16 @@ PFMERGE hll3 hll1 hll2 PFCOUNT hll3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="pfmerge-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/pfselftest.md b/content/commands/pfselftest.md index 9b70ba6c6..8b9781492 100644 --- a/content/commands/pfselftest.md +++ b/content/commands/pfselftest.md @@ -31,4 +31,18 @@ syntax_str: '' title: PFSELFTEST --- The `PFSELFTEST` command is an internal command. -It is meant to be used for developing and testing Redis. \ No newline at end of file +It is meant to be used for developing and testing Redis. + +## Return information + +{{< multitabs id="pfselftest-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/ping.md b/content/commands/ping.md index a65eb05a6..a5c3a7981 100644 --- a/content/commands/ping.md +++ b/content/commands/ping.md @@ -54,3 +54,20 @@ PING PING "hello world" {{% /redis-cli %}} +## Return information + +{{< multitabs id="ping-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument. + +-tab-sep- + +Any of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument. + +{{< /multitabs >}} diff --git a/content/commands/psetex.md b/content/commands/psetex.md index 13c8fd3d9..49a8499dd 100644 --- a/content/commands/psetex.md +++ b/content/commands/psetex.md @@ -69,3 +69,16 @@ PTTL mykey GET mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="psetex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/psubscribe.md b/content/commands/psubscribe.md index e70b305f6..e7856afd5 100644 --- a/content/commands/psubscribe.md +++ b/content/commands/psubscribe.md @@ -52,3 +52,17 @@ For more information, see [Pub/sub]({{< relref "/develop/interact/pubsub" >}}). ## Behavior change history * `>= 6.2.0`: [`RESET`]({{< relref "/commands/reset" >}}) can be called to exit subscribed state. + +## Return information + +{{< multitabs id="psubscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `psubscribe` is pushed as a confirmation that the command succeeded. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `psubscribe` is pushed as a confirmation that the command succeeded. + +{{< /multitabs >}} diff --git a/content/commands/psync.md b/content/commands/psync.md index cd07c4b92..39df118c7 100644 --- a/content/commands/psync.md +++ b/content/commands/psync.md @@ -43,3 +43,17 @@ stream from the master. For more information about replication in Redis please check the [replication page]({{< relref "/operate/oss_and_stack/management/replication" >}}). + +## Return information + +{{< multitabs id="psync-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master. + +-tab-sep- + +**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master. + +{{< /multitabs >}} diff --git a/content/commands/pttl.md b/content/commands/pttl.md index 14a867e46..55115da7e 100644 --- a/content/commands/pttl.md +++ b/content/commands/pttl.md @@ -70,3 +70,22 @@ EXPIRE mykey 1 PTTL mykey {{% /redis-cli %}} +## Return information + +{{< multitabs id="pttl-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in milliseconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in milliseconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/publish.md b/content/commands/publish.md index d15b19e5f..ef2b07c1a 100644 --- a/content/commands/publish.md +++ b/content/commands/publish.md @@ -42,3 +42,17 @@ Posts a message to the given channel. In a Redis Cluster clients can publish to every node. The cluster makes sure that published messages are forwarded as needed, so clients can subscribe to any channel by connecting to any one of the nodes. + +## Return information + +{{< multitabs id="publish-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count. + +{{< /multitabs >}} diff --git a/content/commands/pubsub-channels.md b/content/commands/pubsub-channels.md index 168326273..ad7700dd6 100644 --- a/content/commands/pubsub-channels.md +++ b/content/commands/pubsub-channels.md @@ -41,3 +41,17 @@ An active channel is a Pub/Sub channel with one or more subscribers (excluding c If no `pattern` is specified, all the channels are listed, otherwise if pattern is specified only channels matching the specified glob-style pattern are listed. Cluster note: in a Redis Cluster clients can subscribe to every node, and can also publish to every other node. The cluster will make sure that published messages are forwarded as needed. That said, [`PUBSUB`]({{< relref "/commands/pubsub" >}})'s replies in a cluster only report information from the node's Pub/Sub context, rather than the entire cluster. + +## Return information + +{{< multitabs id="pubsub-channels-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern. + +{{< /multitabs >}} diff --git a/content/commands/pubsub-help.md b/content/commands/pubsub-help.md index e7c4c9621..66a48c0e8 100644 --- a/content/commands/pubsub-help.md +++ b/content/commands/pubsub-help.md @@ -27,3 +27,17 @@ syntax_str: '' title: PUBSUB HELP --- The `PUBSUB HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="pubsub-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/pubsub-numpat.md b/content/commands/pubsub-numpat.md index 688220c1c..2ca1a90e9 100644 --- a/content/commands/pubsub-numpat.md +++ b/content/commands/pubsub-numpat.md @@ -33,3 +33,17 @@ Returns the number of unique patterns that are subscribed to by clients (that ar Note that this isn't the count of clients subscribed to patterns, but the total number of unique patterns all the clients are subscribed to. Cluster note: in a Redis Cluster clients can subscribe to every node, and can also publish to every other node. The cluster will make sure that published messages are forwarded as needed. That said, [`PUBSUB`]({{< relref "/commands/pubsub" >}})'s replies in a cluster only report information from the node's Pub/Sub context, rather than the entire cluster. + +## Return information + +{{< multitabs id="pubsub-numpat-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of patterns all the clients are subscribed to. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of patterns all the clients are subscribed to. + +{{< /multitabs >}} diff --git a/content/commands/pubsub-numsub.md b/content/commands/pubsub-numsub.md index 9fa6213ea..d8b4907e5 100644 --- a/content/commands/pubsub-numsub.md +++ b/content/commands/pubsub-numsub.md @@ -39,3 +39,17 @@ Returns the number of subscribers (exclusive of clients subscribed to patterns) Note that it is valid to call this command without channels. In this case it will just return an empty list. Cluster note: in a Redis Cluster clients can subscribe to every node, and can also publish to every other node. The cluster will make sure that published messages are forwarded as needed. That said, [`PUBSUB`]({{< relref "/commands/pubsub" >}})'s replies in a cluster only report information from the node's Pub/Sub context, rather than the entire cluster. + +## Return information + +{{< multitabs id="pubsub-numsub-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers + +{{< /multitabs >}} diff --git a/content/commands/pubsub-shardchannels.md b/content/commands/pubsub-shardchannels.md index 3c95f6838..503569c5d 100644 --- a/content/commands/pubsub-shardchannels.md +++ b/content/commands/pubsub-shardchannels.md @@ -50,3 +50,17 @@ The information returned about the active shard channels are at the shard level > PUBSUB SHARDCHANNELS o* 1) "orders" ``` + +## Return information + +{{< multitabs id="pubsub-shardchannels-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern. + +{{< /multitabs >}} diff --git a/content/commands/pubsub-shardnumsub.md b/content/commands/pubsub-shardnumsub.md index ff35a76e9..3c3af7792 100644 --- a/content/commands/pubsub-shardnumsub.md +++ b/content/commands/pubsub-shardnumsub.md @@ -48,3 +48,17 @@ Cluster note: in a Redis Cluster, [`PUBSUB`]({{< relref "/commands/pubsub" >}})' 1) "orders" 2) (integer) 1 ``` + +## Return information + +{{< multitabs id="pubsub-shardnumsub-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per shard channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per shard channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers. + +{{< /multitabs >}} diff --git a/content/commands/punsubscribe.md b/content/commands/punsubscribe.md index 518889a17..b6b4301aa 100644 --- a/content/commands/punsubscribe.md +++ b/content/commands/punsubscribe.md @@ -44,3 +44,17 @@ When no patterns are specified, the client is unsubscribed from all the previously subscribed patterns. In this case, a message for every unsubscribed pattern will be sent to the client. + +## Return information + +{{< multitabs id="punsubscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `punsubscribe` is pushed as a confirmation that the command succeeded. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `punsubscribe` is pushed as a confirmation that the command succeeded. + +{{< /multitabs >}} diff --git a/content/commands/quit.md b/content/commands/quit.md index 170e98b33..0c744ba47 100644 --- a/content/commands/quit.md +++ b/content/commands/quit.md @@ -42,3 +42,17 @@ client. **Note:** Clients should not use this command. Instead, clients should simply close the connection when they're not used anymore. Terminating a connection on the client side is preferable, as it eliminates `TIME_WAIT` lingering sockets on the server side. + +## Return information + +{{< multitabs id="quit-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): OK. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/randomkey.md b/content/commands/randomkey.md index 5c151cce3..84de420a7 100644 --- a/content/commands/randomkey.md +++ b/content/commands/randomkey.md @@ -32,3 +32,21 @@ syntax_str: '' title: RANDOMKEY --- Return a random key from the currently selected database. + +## Return information + +{{< multitabs id="randomkey-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when the database is empty. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a random key in database. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when the database is empty. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a random key in the database. + +{{< /multitabs >}} diff --git a/content/commands/readonly.md b/content/commands/readonly.md index 155c610ce..0daf69292 100644 --- a/content/commands/readonly.md +++ b/content/commands/readonly.md @@ -44,3 +44,17 @@ master node. This may happen because: 1. The client sent a command about hash slots never served by the master of this replica. 2. The cluster was reconfigured (for example resharded) and the replica is no longer able to serve commands for a given hash slot. + +## Return information + +{{< multitabs id="readonly-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/readwrite.md b/content/commands/readwrite.md index 1cf65fba7..9f97804f1 100644 --- a/content/commands/readwrite.md +++ b/content/commands/readwrite.md @@ -35,3 +35,17 @@ Read queries against a Redis Cluster replica node are disabled by default, but you can use the [`READONLY`]({{< relref "/commands/readonly" >}}) command to change this behavior on a per- connection basis. The `READWRITE` command resets the readonly mode flag of a connection back to readwrite. + +## Return information + +{{< multitabs id="readwrite-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/rename.md b/content/commands/rename.md index 2a9e0e080..4613ef7c6 100644 --- a/content/commands/rename.md +++ b/content/commands/rename.md @@ -79,4 +79,18 @@ GET myotherkey ## Behavior change history -* `>= 3.2.0`: The command no longer returns an error when source and destination names are the same. \ No newline at end of file +* `>= 3.2.0`: The command no longer returns an error when source and destination names are the same. + +## Return information + +{{< multitabs id="rename-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/renamenx.md b/content/commands/renamenx.md index 1464b7fc5..c82e0c825 100644 --- a/content/commands/renamenx.md +++ b/content/commands/renamenx.md @@ -81,3 +81,20 @@ RENAMENX mykey myotherkey GET myotherkey {{% /redis-cli %}} +## Return information + +{{< multitabs id="renamenx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was renamed to _newkey_. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _newkey_ already exists. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was renamed to _newkey_. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _newkey_ already exists. + +{{< /multitabs >}} diff --git a/content/commands/replconf.md b/content/commands/replconf.md index e3d57e666..f7be21e27 100644 --- a/content/commands/replconf.md +++ b/content/commands/replconf.md @@ -34,4 +34,18 @@ syntax_str: '' title: REPLCONF --- The `REPLCONF` command is an internal command. -It is used by a Redis master to configure a connected replica. \ No newline at end of file +It is used by a Redis master to configure a connected replica. + +## Return information + +{{< multitabs id="replconf-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/replicaof.md b/content/commands/replicaof.md index e68a0ea62..cb18128c0 100644 --- a/content/commands/replicaof.md +++ b/content/commands/replicaof.md @@ -71,3 +71,17 @@ The form `REPLICAOF` NO ONE will stop replication, turning the server into a MAS > REPLICAOF 127.0.0.1 6799 "OK" ``` + +## Return information + +{{< multitabs id="replicaof-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/reset.md b/content/commands/reset.md index 4fd07264c..39bf0e638 100644 --- a/content/commands/reset.md +++ b/content/commands/reset.md @@ -52,3 +52,17 @@ following: authentication is enabled. * Turns off `NO-EVICT` mode. * Turns off `NO-TOUCH` mode. + +## Return information + +{{< multitabs id="reset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `RESET`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `RESET`. + +{{< /multitabs >}} diff --git a/content/commands/restore.md b/content/commands/restore.md index 368b4eff2..20a513b9c 100644 --- a/content/commands/restore.md +++ b/content/commands/restore.md @@ -125,3 +125,17 @@ redis> LRANGE mykey 0 -1 2) "2" 3) "3" ``` + +## Return information + +{{< multitabs id="restore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/role.md b/content/commands/role.md index 8267e2bef..0cda52ab4 100644 --- a/content/commands/role.md +++ b/content/commands/role.md @@ -109,3 +109,17 @@ ROLE **A note about the word slave used in this man page**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated. + +## Return information + +{{< multitabs id="role-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): where the first element is one of `master`, `slave`, or `sentinel`, and the additional elements are role-specific as illustrated above. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): where the first element is one of `master`, `slave`, or `sentinel`, and the additional elements are role-specific as illustrated above. + +{{< /multitabs >}} diff --git a/content/commands/rpop.md b/content/commands/rpop.md index a7da667d4..457985eed 100644 --- a/content/commands/rpop.md +++ b/content/commands/rpop.md @@ -86,3 +86,23 @@ RPOP mylist RPOP mylist 2 LRANGE mylist 0 -1 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="rpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the last element. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the last element. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements. + +{{< /multitabs >}} diff --git a/content/commands/rpoplpush.md b/content/commands/rpoplpush.md index 3f18669fd..afb4f860d 100644 --- a/content/commands/rpoplpush.md +++ b/content/commands/rpoplpush.md @@ -142,3 +142,21 @@ reachable, with the smallest delay possible, using a number of parallel workers. Note that this implementation of workers is trivially scalable and reliable, because even if a message is lost the item is still in the queue and will be processed at the next iteration. + +## Return information + +{{< multitabs id="rpoplpush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the source list is empty. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the source list is empty. + +{{< /multitabs >}} diff --git a/content/commands/rpush.md b/content/commands/rpush.md index c4367831d..01a207d8e 100644 --- a/content/commands/rpush.md +++ b/content/commands/rpush.md @@ -88,3 +88,16 @@ RPUSH mylist "world" LRANGE mylist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="rpush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +{{< /multitabs >}} diff --git a/content/commands/rpushx.md b/content/commands/rpushx.md index e5089e6ef..968de5199 100644 --- a/content/commands/rpushx.md +++ b/content/commands/rpushx.md @@ -70,3 +70,16 @@ LRANGE mylist 0 -1 LRANGE myotherlist 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="rpushx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation. + +{{< /multitabs >}} diff --git a/content/commands/sadd.md b/content/commands/sadd.md index 2e95ae65d..4b2aa5eee 100644 --- a/content/commands/sadd.md +++ b/content/commands/sadd.md @@ -81,3 +81,17 @@ SADD myset "Hello" "World" SADD myset "World" SMEMBERS myset {{% /redis-cli %}} + +## Return information + +{{< multitabs id="sadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements that were added to the set, not including all the elements already present in the set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements that were added to the set, not including all the elements already present in the set. + +{{< /multitabs >}} diff --git a/content/commands/save.md b/content/commands/save.md index 2685d865e..204f46a70 100644 --- a/content/commands/save.md +++ b/content/commands/save.md @@ -42,3 +42,17 @@ However in case of issues preventing Redis to create the background saving child good last resort to perform the dump of the latest dataset. See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information. + +## Return information + +{{< multitabs id="save-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/scan.md b/content/commands/scan.md index 01baf0ed1..335d52524 100644 --- a/content/commands/scan.md +++ b/content/commands/scan.md @@ -296,3 +296,21 @@ Give the following commands, showing iteration of a hash key, a try in the inter HMSET hash name Jack age 33 HSCAN hash 0 {{% /redis-cli %}} + +## Return information + +{{< multitabs id="scan-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements. +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned keys. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements. +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned keys. + +{{< /multitabs >}} diff --git a/content/commands/scard.md b/content/commands/scard.md index 4b840cced..3496adc15 100644 --- a/content/commands/scard.md +++ b/content/commands/scard.md @@ -55,3 +55,16 @@ SADD myset "World" SCARD myset {{% /redis-cli %}} +## Return information + +{{< multitabs id="scard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of elements) of the set, or `0` if the key does not exist. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The cardinality (number of elements) of the set, or 0 if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/script-debug.md b/content/commands/script-debug.md index b29ac140b..b380a33ad 100644 --- a/content/commands/script-debug.md +++ b/content/commands/script-debug.md @@ -64,3 +64,17 @@ is active and retains all changes to the data set once it ends. * `NO`. Disables scripts debug mode. For more information about [`EVAL`]({{< relref "/commands/eval" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}). + +## Return information + +{{< multitabs id="script-debug-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/script-exists.md b/content/commands/script-exists.md index 583aeca4a..cbf633c79 100644 --- a/content/commands/script-exists.md +++ b/content/commands/script-exists.md @@ -46,3 +46,17 @@ operation can be performed solely using [`EVALSHA`]({{< relref "/commands/evalsh bandwidth. For more information about [`EVAL`]({{< relref "/commands/eval" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}). + +## Return information + +{{< multitabs id="script-exists-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments. + +{{< /multitabs >}} diff --git a/content/commands/script-flush.md b/content/commands/script-flush.md index 2481e7bfb..31a1783a0 100644 --- a/content/commands/script-flush.md +++ b/content/commands/script-flush.md @@ -60,4 +60,18 @@ For more information about [`EVAL`]({{< relref "/commands/eval" >}}) scripts ple ## Behavior change history -* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive. \ No newline at end of file +* `>= 6.2.0`: Default flush behavior now configurable by the **lazyfree-lazy-user-flush** configuration directive. + +## Return information + +{{< multitabs id="script-flush-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/script-help.md b/content/commands/script-help.md index 49ce32055..c9d4273dd 100644 --- a/content/commands/script-help.md +++ b/content/commands/script-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: SCRIPT HELP --- The `SCRIPT HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="script-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/script-kill.md b/content/commands/script-kill.md index 35b44570a..4b1473773 100644 --- a/content/commands/script-kill.md +++ b/content/commands/script-kill.md @@ -45,3 +45,17 @@ the Redis process in a hard way and preventing it from persisting with half-writ information. For more information about [`EVAL`]({{< relref "/commands/eval" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}). + +## Return information + +{{< multitabs id="script-kill-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/script-load.md b/content/commands/script-load.md index 5671599ef..f7d3f65ba 100644 --- a/content/commands/script-load.md +++ b/content/commands/script-load.md @@ -46,3 +46,17 @@ The command works in the same way even if the script was already present in the script cache. For more information about [`EVAL`]({{< relref "/commands/eval" >}}) scripts please refer to [Introduction to Eval Scripts]({{< relref "/develop/interact/programmability/eval-intro" >}}). + +## Return information + +{{< multitabs id="script-load-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the SHA1 digest of the script added into the script cache. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the SHA1 digest of the script added into the script cache. + +{{< /multitabs >}} diff --git a/content/commands/sdiff.md b/content/commands/sdiff.md index 746d401ae..25772caab 100644 --- a/content/commands/sdiff.md +++ b/content/commands/sdiff.md @@ -74,3 +74,16 @@ SADD key2 "e" SDIFF key1 key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="sdiff-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list with members of the resulting set. + +-tab-sep- + +[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set. + +{{< /multitabs >}} diff --git a/content/commands/sdiffstore.md b/content/commands/sdiffstore.md index 56e5d962b..ca37b7dae 100644 --- a/content/commands/sdiffstore.md +++ b/content/commands/sdiffstore.md @@ -81,3 +81,16 @@ SDIFFSTORE key key1 key2 SMEMBERS key {{% /redis-cli %}} +## Return information + +{{< multitabs id="sdiffstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set. + +{{< /multitabs >}} diff --git a/content/commands/select.md b/content/commands/select.md index 89ca5a1ce..61bce3125 100644 --- a/content/commands/select.md +++ b/content/commands/select.md @@ -42,3 +42,17 @@ In practical terms, Redis databases should be used to separate different keys be When using Redis Cluster, the `SELECT` command cannot be used, since Redis Cluster only supports database zero. In the case of a Redis Cluster, having multiple databases would be useless and an unnecessary source of complexity. Commands operating atomically on a single database would not be possible with the Redis Cluster design and goals. Since the currently selected database is a property of the connection, clients should track the currently selected database and re-select it on reconnection. While there is no command in order to query the selected database in the current connection, the [`CLIENT LIST`]({{< relref "/commands/client-list" >}}) output shows, for each client, the currently selected database. + +## Return information + +{{< multitabs id="select-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/set.md b/content/commands/set.md index 7d7422893..1da2fe740 100644 --- a/content/commands/set.md +++ b/content/commands/set.md @@ -173,3 +173,25 @@ An example of unlock script would be similar to the following: end The script should be called with `EVAL ...script... 1 resource-name token-value` + +## Return information + +{{< multitabs id="set-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options). +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The key didn't exist before the `SET`. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key. + +-tab-sep- + +Any of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options). +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set. +* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` given: The key didn't exist before the `SET`. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key. + +{{< /multitabs >}} diff --git a/content/commands/setbit.md b/content/commands/setbit.md index d3f265642..e13fe3284 100644 --- a/content/commands/setbit.md +++ b/content/commands/setbit.md @@ -213,3 +213,17 @@ end **Note:** the implementation for getting a range of bit offsets from a bitmap is left as an exercise to the reader. + +## Return information + +{{< multitabs id="setbit-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the original bit value stored at _offset_. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the original bit value stored at _offset_. + +{{< /multitabs >}} diff --git a/content/commands/setex.md b/content/commands/setex.md index 2eb1d4f91..66bcc0b17 100644 --- a/content/commands/setex.md +++ b/content/commands/setex.md @@ -78,4 +78,18 @@ GET mykey ## See also -[`TTL`]({{< relref "/commands/ttl" >}}) \ No newline at end of file +[`TTL`]({{< relref "/commands/ttl" >}}) + +## Return information + +{{< multitabs id="setex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/setnx.md b/content/commands/setnx.md index 53fe15475..7bb9ce1e1 100644 --- a/content/commands/setnx.md +++ b/content/commands/setnx.md @@ -147,3 +147,21 @@ unlocking the key with [`DEL`]({{< relref "/commands/del" >}}) because client fa crashing but also blocking a lot of time against some operations and trying to issue [`DEL`]({{< relref "/commands/del" >}}) after a lot of time (when the LOCK is already held by another client). + +## Return information + +{{< multitabs id="setnx-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the key was not set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the key was set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the key was not set. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the key was set. + +{{< /multitabs >}} diff --git a/content/commands/setrange.md b/content/commands/setrange.md index 001f7182b..70cce0e06 100644 --- a/content/commands/setrange.md +++ b/content/commands/setrange.md @@ -102,3 +102,16 @@ SETRANGE key2 6 "Redis" GET key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="setrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after it was modified by the command. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after it was modified by the command. + +{{< /multitabs >}} diff --git a/content/commands/shutdown.md b/content/commands/shutdown.md index 157f20dd6..dcf8a0db4 100644 --- a/content/commands/shutdown.md +++ b/content/commands/shutdown.md @@ -134,4 +134,18 @@ To minimize the risk of data loss in such setups, it's advised to trigger a manu ## Behavior change history -* `>= 7.0.0`: Introduced waiting for lagging replicas before exiting. \ No newline at end of file +* `>= 7.0.0`: Introduced waiting for lagging replicas before exiting. + +## Return information + +{{< multitabs id="shutdown-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if _ABORT_ was specified and shutdown was aborted. On successful shutdown, nothing is returned because the server quits and the connection is closed. On failure, an error is returned. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if _ABORT_ was specified and shutdown was aborted. On successful shutdown, nothing is returned because the server quits and the connection is closed. On failure, an error is returned. + +{{< /multitabs >}} diff --git a/content/commands/sinter.md b/content/commands/sinter.md index a8025e49d..a90a5f9ec 100644 --- a/content/commands/sinter.md +++ b/content/commands/sinter.md @@ -77,3 +77,16 @@ SADD key2 "e" SINTER key1 key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="sinter-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array with the members of the resulting set. + +-tab-sep- + +[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set. + +{{< /multitabs >}} diff --git a/content/commands/sintercard.md b/content/commands/sintercard.md index a046f88ad..8e65402e7 100644 --- a/content/commands/sintercard.md +++ b/content/commands/sintercard.md @@ -81,3 +81,16 @@ SINTERCARD 2 key1 key2 SINTERCARD 2 key1 key2 LIMIT 1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="sintercard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting intersection. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting intersection. + +{{< /multitabs >}} diff --git a/content/commands/sinterstore.md b/content/commands/sinterstore.md index f232d42c3..1397cbb7a 100644 --- a/content/commands/sinterstore.md +++ b/content/commands/sinterstore.md @@ -82,3 +82,16 @@ SINTERSTORE key key1 key2 SMEMBERS key {{% /redis-cli %}} +## Return information + +{{< multitabs id="sinterstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the result set. + +{{< /multitabs >}} diff --git a/content/commands/sismember.md b/content/commands/sismember.md index bc718a20c..c00bfe259 100644 --- a/content/commands/sismember.md +++ b/content/commands/sismember.md @@ -58,3 +58,20 @@ SISMEMBER myset "one" SISMEMBER myset "two" {{% /redis-cli %}} +## Return information + +{{< multitabs id="sismember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of the set, or when the key does not exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is a member of the set. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of the set, or when the key does not exist. +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is a member of the set. + +{{< /multitabs >}} diff --git a/content/commands/slaveof.md b/content/commands/slaveof.md index bed6d2ed6..589ca8a80 100644 --- a/content/commands/slaveof.md +++ b/content/commands/slaveof.md @@ -77,3 +77,17 @@ So, if the old master stops working, it is possible to turn the replica into a master and set the application to use this new master in read/write. Later when the other Redis server is fixed, it can be reconfigured to work as a replica. + +## Return information + +{{< multitabs id="slaveof-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/slowlog-get.md b/content/commands/slowlog-get.md index 52b5df6d0..b7c61a025 100644 --- a/content/commands/slowlog-get.md +++ b/content/commands/slowlog-get.md @@ -62,3 +62,17 @@ Each entry from the slow log is comprised of the following six values: The entry's unique ID can be used in order to avoid processing slow log entries multiple times (for instance you may have a script sending you an email alert for every new slow log entry). The ID is never reset in the course of the Redis server execution, only a server restart will reset it. + +## Return information + +{{< multitabs id="slowlog-get-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of slow log entries per the above format. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of slow log entries per the above format. + +{{< /multitabs >}} diff --git a/content/commands/slowlog-help.md b/content/commands/slowlog-help.md index 1de47c801..f64a42c59 100644 --- a/content/commands/slowlog-help.md +++ b/content/commands/slowlog-help.md @@ -27,3 +27,17 @@ syntax_str: '' title: SLOWLOG HELP --- The `SLOWLOG HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="slowlog-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/slowlog-len.md b/content/commands/slowlog-len.md index 6476aebf6..a90745a7c 100644 --- a/content/commands/slowlog-len.md +++ b/content/commands/slowlog-len.md @@ -39,3 +39,17 @@ A new entry is added to the slow log whenever a command exceeds the execution ti The maximum number of entries in the slow log is governed by the `slowlog-max-len` configuration directive. Once the slog log reaches its maximal size, the oldest entry is removed whenever a new entry is created. The slow log can be cleared with the [`SLOWLOG RESET`]({{< relref "/commands/slowlog-reset" >}}) command. + +## Return information + +{{< multitabs id="slowlog-len-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries in the slow log. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries in the slow log. + +{{< /multitabs >}} diff --git a/content/commands/slowlog-reset.md b/content/commands/slowlog-reset.md index 40fa075e8..20776540b 100644 --- a/content/commands/slowlog-reset.md +++ b/content/commands/slowlog-reset.md @@ -35,3 +35,17 @@ title: SLOWLOG RESET This command resets the slow log, clearing all entries in it. Once deleted the information is lost forever. + +## Return information + +{{< multitabs id="slowlog-reset-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/smembers.md b/content/commands/smembers.md index 8ba8ab695..79a352b7d 100644 --- a/content/commands/smembers.md +++ b/content/commands/smembers.md @@ -70,3 +70,17 @@ SADD myset "Hello" SADD myset "World" SMEMBERS myset {{% /redis-cli %}} + +## Return information + +{{< multitabs id="smembers-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): an array with all the members of the set. + +-tab-sep- + +[Set reply](../../develop/reference/protocol-spec#sets): a set with all the members of the set. + +{{< /multitabs >}} diff --git a/content/commands/smismember.md b/content/commands/smismember.md index f4c383e10..f9a0c995f 100644 --- a/content/commands/smismember.md +++ b/content/commands/smismember.md @@ -62,3 +62,16 @@ SADD myset "one" SMISMEMBER myset "one" "notamember" {{% /redis-cli %}} +## Return information + +{{< multitabs id="smismember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list representing the membership of the given elements, in the same order as they are requested. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list representing the membership of the given elements, in the same order as they are requested. + +{{< /multitabs >}} diff --git a/content/commands/smove.md b/content/commands/smove.md index 8c1eb8307..9d86bb7e5 100644 --- a/content/commands/smove.md +++ b/content/commands/smove.md @@ -89,3 +89,20 @@ SMEMBERS myset SMEMBERS myotherset {{% /redis-cli %}} +## Return information + +{{< multitabs id="smove-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is moved. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of _source_ and no operation was performed. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is moved. +* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of _source_ and no operation was performed. + +{{< /multitabs >}} diff --git a/content/commands/sort.md b/content/commands/sort.md index 001b68da5..3c852c111 100644 --- a/content/commands/sort.md +++ b/content/commands/sort.md @@ -276,3 +276,19 @@ SORT mylist BY weight_*->fieldname GET object_*->fieldname The string `->` is used to separate the key name from the hash field name. The key is substituted as documented above, and the hash stored at the resulting key is accessed to retrieve the specified hash field. + +## Return information + +{{< multitabs id="sort-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): without passing the _STORE_ option, the command returns a list of sorted elements. +[Integer reply](../../develop/reference/protocol-spec#integers): when the _STORE_ option is specified, the command returns the number of sorted elements in the destination list. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): without passing the _STORE_ option, the command returns a list of sorted elements. +[Integer reply](../../develop/reference/protocol-spec#integers): when the _STORE_ option is specified, the command returns the number of sorted elements in the destination list. + +{{< /multitabs >}} diff --git a/content/commands/sort_ro.md b/content/commands/sort_ro.md index a05c65b4b..4beecd60d 100644 --- a/content/commands/sort_ro.md +++ b/content/commands/sort_ro.md @@ -118,3 +118,17 @@ See original [`SORT`]({{< relref "/commands/sort" >}}) for more details. ``` SORT_RO mylist BY weight_*->fieldname GET object_*->fieldname ``` + +## Return information + +{{< multitabs id="sort-ro-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sorted elements. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sorted elements. + +{{< /multitabs >}} diff --git a/content/commands/spop.md b/content/commands/spop.md index 8bc9ae453..b34fbb3fc 100644 --- a/content/commands/spop.md +++ b/content/commands/spop.md @@ -85,3 +85,23 @@ SMEMBERS myset ## Distribution of returned elements Note that this command is not suitable when you need a guaranteed uniform distribution of the returned elements. For more information about the algorithms used for `SPOP`, look up both the Knuth sampling and Floyd sampling algorithms. + +## Return information + +{{< multitabs id="spop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the removed member. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of the removed members. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the removed member. +* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of the removed members. + +{{< /multitabs >}} diff --git a/content/commands/spublish.md b/content/commands/spublish.md index 3997fcb0e..700b964c9 100644 --- a/content/commands/spublish.md +++ b/content/commands/spublish.md @@ -65,3 +65,17 @@ For example the following command publishes to the `orders` channel with a subsc > spublish orders hello (integer) 1 ``` + +## Return information + +{{< multitabs id="spublish-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count + +{{< /multitabs >}} diff --git a/content/commands/srandmember.md b/content/commands/srandmember.md index 60b8cea92..f765f31f2 100644 --- a/content/commands/srandmember.md +++ b/content/commands/srandmember.md @@ -97,3 +97,21 @@ The distribution of the returned elements is far from perfect when the number of The algorithm used, that is implemented inside dict.c, samples the hash table buckets to find a non-empty one. Once a non empty bucket is found, since we use chaining in our hash table implementation, the number of elements inside the bucket is checked and a random element is selected. This means that if you have two non-empty buckets in the entire hash table, and one has three elements while one has just one, the element that is alone in its bucket will be returned with much higher probability. + +## Return information + +{{< multitabs id="srandmember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or a [Nil reply](../../develop/reference/protocol-spec#bulk-strings) when _key_ doesn't exist. +* [Array reply](../../develop/reference/protocol-spec#arrays): when the optional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or a [Null reply](../../develop/reference/protocol-spec#nulls) when _key_ doesn't exist. +* [Array reply](../../develop/reference/protocol-spec#arrays): when the optional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/srem.md b/content/commands/srem.md index 07364e14e..f80a36470 100644 --- a/content/commands/srem.md +++ b/content/commands/srem.md @@ -73,3 +73,16 @@ SREM myset "four" SMEMBERS myset {{% /redis-cli %}} +## Return information + +{{< multitabs id="srem-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members that were removed from the set, not including non existing members. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): Number of members that were removed from the set, not including non existing members. + +{{< /multitabs >}} diff --git a/content/commands/sscan.md b/content/commands/sscan.md index 28b3c1a5d..88bc25114 100644 --- a/content/commands/sscan.md +++ b/content/commands/sscan.md @@ -63,3 +63,21 @@ syntax_str: "cursor [MATCH\_pattern] [COUNT\_count]" title: SSCAN --- See [`SCAN`]({{< relref "/commands/scan" >}}) for `SSCAN` documentation. + +## Return information + +{{< multitabs id="sscan-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements: +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned members. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements: +* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor. +* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned members. + +{{< /multitabs >}} diff --git a/content/commands/ssubscribe.md b/content/commands/ssubscribe.md index 8013635f8..0a7b26026 100644 --- a/content/commands/ssubscribe.md +++ b/content/commands/ssubscribe.md @@ -67,3 +67,17 @@ Reading messages... (press Ctrl-C to quit) 2) "orders" 3) "hello" ``` + +## Return information + +{{< multitabs id="ssubscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `ssubscribe` is pushed as a confirmation that the command succeeded. Note that this command can also return a -MOVED redirect. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string 'ssubscribe' is pushed as a confirmation that the command succeeded. Note that this command can also return a -MOVED redirect. + +{{< /multitabs >}} diff --git a/content/commands/strlen.md b/content/commands/strlen.md index 0dec12727..06a21a76b 100644 --- a/content/commands/strlen.md +++ b/content/commands/strlen.md @@ -56,3 +56,16 @@ STRLEN mykey STRLEN nonexisting {{% /redis-cli %}} +## Return information + +{{< multitabs id="strlen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string stored at key, or 0 when the key does not exist. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string stored at key, or 0 when the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/subscribe.md b/content/commands/subscribe.md index 6fd373977..a57a0159d 100644 --- a/content/commands/subscribe.md +++ b/content/commands/subscribe.md @@ -46,3 +46,17 @@ For more information, see [Pub/sub]({{< relref "/develop/interact/pubsub" >}}). ## Behavior change history * `>= 6.2.0`: [`RESET`]({{< relref "/commands/reset" >}}) can be called to exit subscribed state. + +## Return information + +{{< multitabs id="subscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `subscribe` is pushed as a confirmation that the command succeeded. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `subscribe` is pushed as a confirmation that the command succeeded. + +{{< /multitabs >}} diff --git a/content/commands/substr.md b/content/commands/substr.md index d80b7f9cb..04aad55df 100644 --- a/content/commands/substr.md +++ b/content/commands/substr.md @@ -76,3 +76,16 @@ GETRANGE mykey 0 -1 GETRANGE mykey 10 100 {{% /redis-cli %}} +## Return information + +{{< multitabs id="substr-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). + +{{< /multitabs >}} diff --git a/content/commands/sunion.md b/content/commands/sunion.md index d868d83c6..1afc8c488 100644 --- a/content/commands/sunion.md +++ b/content/commands/sunion.md @@ -73,3 +73,16 @@ SADD key2 "e" SUNION key1 key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="sunion-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list with members of the resulting set. + +-tab-sep- + +[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set. + +{{< /multitabs >}} diff --git a/content/commands/sunionstore.md b/content/commands/sunionstore.md index 69c4b3a49..eab710494 100644 --- a/content/commands/sunionstore.md +++ b/content/commands/sunionstore.md @@ -81,3 +81,16 @@ SUNIONSTORE key key1 key2 SMEMBERS key {{% /redis-cli %}} +## Return information + +{{< multitabs id="sunionstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): Number of the elements in the resulting set. + +{{< /multitabs >}} diff --git a/content/commands/sunsubscribe.md b/content/commands/sunsubscribe.md index b4248a7a7..1e7aeb34a 100644 --- a/content/commands/sunsubscribe.md +++ b/content/commands/sunsubscribe.md @@ -55,3 +55,17 @@ In this case a message for every unsubscribed shard channel will be sent to the Note: The global channels and shard channels needs to be unsubscribed from separately. For more information about sharded Pub/Sub, see [Sharded Pub/Sub]({{< relref "/develop/interact/pubsub#sharded-pubsub" >}}). + +## Return information + +{{< multitabs id="sunsubscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `sunsubscribe` is pushed as a confirmation that the command succeeded. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `sunsubscribe` is pushed as a confirmation that the command succeeded. + +{{< /multitabs >}} diff --git a/content/commands/swapdb.md b/content/commands/swapdb.md index 1aa86ba23..729001b4e 100644 --- a/content/commands/swapdb.md +++ b/content/commands/swapdb.md @@ -50,3 +50,17 @@ This will swap database 0 with database 1. All the clients connected with databa ``` SWAPDB 0 1 ``` + +## Return information + +{{< multitabs id="swapdb-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/sync.md b/content/commands/sync.md index f1eb8ca75..c57d2887b 100644 --- a/content/commands/sync.md +++ b/content/commands/sync.md @@ -39,3 +39,17 @@ For more information about replication in Redis please check the [replication page][tr]. [tr]: /operate/oss_and_stack/management/replication + +## Return information + +{{< multitabs id="sync-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master. + +-tab-sep- + +**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master. + +{{< /multitabs >}} diff --git a/content/commands/time.md b/content/commands/time.md index b5133b6f0..05126700b 100644 --- a/content/commands/time.md +++ b/content/commands/time.md @@ -41,3 +41,16 @@ TIME TIME {{% /redis-cli %}} +## Return information + +{{< multitabs id="time-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count. + +{{< /multitabs >}} diff --git a/content/commands/touch.md b/content/commands/touch.md index 922a0eee9..4125271b8 100644 --- a/content/commands/touch.md +++ b/content/commands/touch.md @@ -62,3 +62,16 @@ SET key2 "World" TOUCH key1 key2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="touch-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of touched keys. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of touched keys. + +{{< /multitabs >}} diff --git a/content/commands/ttl.md b/content/commands/ttl.md index 6946cf2ab..b033f4687 100644 --- a/content/commands/ttl.md +++ b/content/commands/ttl.md @@ -82,3 +82,23 @@ SET mykey "Hello" EXPIRE mykey 10 TTL mykey {{% /redis-cli %}} + +## Return information + +{{< multitabs id="ttl-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in seconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in seconds. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration. +* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/type.md b/content/commands/type.md index dcdc9a53f..de42aa036 100644 --- a/content/commands/type.md +++ b/content/commands/type.md @@ -60,3 +60,16 @@ TYPE key2 TYPE key3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="type-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): the type of _key_, or `none` when _key_ doesn't exist. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): the type of _key_, or `none` when _key_ doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/unlink.md b/content/commands/unlink.md index e25e92d11..afd537af8 100644 --- a/content/commands/unlink.md +++ b/content/commands/unlink.md @@ -67,3 +67,16 @@ SET key2 "World" UNLINK key1 key2 key3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="unlink-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were unlinked. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were unlinked. + +{{< /multitabs >}} diff --git a/content/commands/unsubscribe.md b/content/commands/unsubscribe.md index e7e9f71d5..9ad49ad92 100644 --- a/content/commands/unsubscribe.md +++ b/content/commands/unsubscribe.md @@ -42,3 +42,17 @@ When no channels are specified, the client is unsubscribed from all the previously subscribed channels. In this case, a message for every unsubscribed channel will be sent to the client. + +## Return information + +{{< multitabs id="unsubscribe-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `unsubscribe` is pushed as a confirmation that the command succeeded. + +-tab-sep- + +When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `unsubscribe` is pushed as a confirmation that the command succeeded. + +{{< /multitabs >}} diff --git a/content/commands/unwatch.md b/content/commands/unwatch.md index 5eedf5361..55680f196 100644 --- a/content/commands/unwatch.md +++ b/content/commands/unwatch.md @@ -35,3 +35,17 @@ Flushes all the previously watched keys for a [transaction][tt]. [tt]: /develop/interact/transactions If you call [`EXEC`]({{< relref "/commands/exec" >}}) or [`DISCARD`]({{< relref "/commands/discard" >}}), there's no need to manually call `UNWATCH`. + +## Return information + +{{< multitabs id="unwatch-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/vadd.md b/content/commands/vadd.md index 2e5d65c2f..8c3dbeeca 100644 --- a/content/commands/vadd.md +++ b/content/commands/vadd.md @@ -116,4 +116,22 @@ If you don't have a recall quality problem, the default is acceptable, and uses ## Related topics -- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) \ No newline at end of file +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): 1 if key was added; 0 if key was not added. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed. + +-tab-sep- + +One of the following: +* [Boolean reply](../../develop/reference/protocol-spec#booleans): true if key was added; false if key was not added. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed. + +{{< /multitabs >}} diff --git a/content/commands/vcard.md b/content/commands/vcard.md index 2aa786831..c0c115908 100644 --- a/content/commands/vcard.md +++ b/content/commands/vcard.md @@ -39,3 +39,17 @@ is the name of the key that holds the vector set. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vcard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set. + +{{< /multitabs >}} diff --git a/content/commands/vdim.md b/content/commands/vdim.md index d033a5ddc..c133f1d5a 100644 --- a/content/commands/vdim.md +++ b/content/commands/vdim.md @@ -41,3 +41,21 @@ is the name of the key that holds the vector set. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vdim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist. + +-tab-sep- + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/vemb.md b/content/commands/vemb.md index 861ae8769..998ff6c6a 100644 --- a/content/commands/vemb.md +++ b/content/commands/vemb.md @@ -70,3 +70,35 @@ returns the raw vector data, its quantization type, and metadata such as norm an ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vemb-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): of real numbers as [bulk strings](../../develop/reference/protocol-spec#bulk-strings), representing the vector. +* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements: + 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`. + 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data: + * 4-byte floats for fp32 + * A bitmap for binary quantization + * A byte array for q8 + 1. The L2 norm, as a [simple string](../../develop/reference/protocol-spec#simple-strings), of the vector before normalization. + 1. (Only for q8): The quantization range as a [simple string](../../develop/reference/protocol-spec#simple-strings). Multiply this by integer components to recover normalized values. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): of [doubles](../../develop/reference/protocol-spec#doubles), representing the vector. +* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements: + 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`. + 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data: + * 4-byte floats for fp32 + * A bitmap for binary quantization + * A byte array for q8 + 1. The [double](../../develop/reference/protocol-spec#doubles) L2 norm of the vector before normalization. + 1. (Only for q8): The quantization range as a [double](../../develop/reference/protocol-spec#doubles). Multiply this by integer components to recover normalized values. + +{{< /multitabs >}} diff --git a/content/commands/vgetattr.md b/content/commands/vgetattr.md index 68184c7fc..938b9dc7e 100644 --- a/content/commands/vgetattr.md +++ b/content/commands/vgetattr.md @@ -44,3 +44,21 @@ is the name of the element whose attributes you want to retrieve. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vgetattr-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s). +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown key or element, or when no attributes exist for the given key/element pair. + +-tab-sep- + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s). +* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key or element, or when no attributes exist for the given key/element pair. + +{{< /multitabs >}} diff --git a/content/commands/vinfo.md b/content/commands/vinfo.md index 7044fdf7a..a8a77485d 100644 --- a/content/commands/vinfo.md +++ b/content/commands/vinfo.md @@ -50,3 +50,21 @@ is the name of the key that holds the vector set. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vinfo-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. +* [Array reply](../../develop/reference/protocol-spec#arrays) (null array reply) for unknown key. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. +* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key. + +{{< /multitabs >}} diff --git a/content/commands/vlinks.md b/content/commands/vlinks.md index 5c88a1e92..f6288764a 100644 --- a/content/commands/vlinks.md +++ b/content/commands/vlinks.md @@ -58,3 +58,22 @@ includes similarity scores for each neighbor. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vlinks-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings); interleved with scores when using the WITHSCORES option. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys and/or elements. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings) when used without the WITHSCORES option. +* [Map reply](../../develop/reference/protocol-spec#maps) containing the names of adjecent elements as [strings](../../develop/reference/protocol-spec#simple-strings), together with their scores as [doubles](../../develop/reference/protocol-spec#doubles) when used with the WITHSCORES option. +* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys and/or elements. + +{{< /multitabs >}} diff --git a/content/commands/vrandmember.md b/content/commands/vrandmember.md index bf8ea842b..26f751464 100644 --- a/content/commands/vrandmember.md +++ b/content/commands/vrandmember.md @@ -111,3 +111,23 @@ specifies the number of elements to return. Positive values return distinct elem ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vrandmember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of count random elements as [strings](../../develop/reference/protocol-spec#simple-strings). +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys. +* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of *count* random elements as [strings](../../develop/reference/protocol-spec#simple-strings). +* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys. +* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified. + +{{< /multitabs >}} diff --git a/content/commands/vrem.md b/content/commands/vrem.md index 208caae25..444692b05 100644 --- a/content/commands/vrem.md +++ b/content/commands/vrem.md @@ -57,3 +57,17 @@ is the name of the element to remove from the vector set. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vrem-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): 0 if either element or key do not exist; 1 if the element was removed. + +-tab-sep- + +[Boolean reply](../../develop/reference/protocol-spec#booleans): false if either element or key do not exist; true if the element was removed. + +{{< /multitabs >}} diff --git a/content/commands/vsetattr.md b/content/commands/vsetattr.md index ca4833b90..46688b309 100644 --- a/content/commands/vsetattr.md +++ b/content/commands/vsetattr.md @@ -58,3 +58,21 @@ is a valid JSON string. Use an empty string (`""`) to delete the attributes. ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vsetattr-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): 0 if either the key or element does not exist; 1 if the attributes were successfully added to the element. +* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string. + +-tab-sep- + +One of the following: +* [Boolean reply](../../develop/reference/protocol-spec#booleans): false if either the key or element does not exist; true if the attributes were successfully added to the element. +* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string. + +{{< /multitabs >}} diff --git a/content/commands/vsim.md b/content/commands/vsim.md index a6bbfa991..90326672a 100644 --- a/content/commands/vsim.md +++ b/content/commands/vsim.md @@ -120,3 +120,24 @@ executes the search in the main thread instead of a background thread. Useful fo ## Related topics - [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vsim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for unknown element. +* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key. +* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements; juxtaposed with scores when used with the WITHSCORES option. + +-tab-sep- + +One of the following: +* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for unknown element. +* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key. +* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements. +* [Map reply](../../develop/reference/protocol-spec#maps) with matching elements and [double](../../develop/reference/protocol-spec#doubles) scores when used with the WITHSCORES option. + +{{< /multitabs >}} diff --git a/content/commands/wait.md b/content/commands/wait.md index 6990455d5..6bfe3478a 100644 --- a/content/commands/wait.md +++ b/content/commands/wait.md @@ -92,3 +92,17 @@ OK ``` In the following example the first call to `WAIT` does not use a timeout and asks for the write to reach 1 replica. It returns with success. In the second attempt instead we put a timeout, and ask for the replication of the write to two replicas. Since there is a single replica available, after one second `WAIT` unblocks and returns 1, the number of replicas reached. + +## Return information + +{{< multitabs id="wait-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the command returns the number of replicas reached by all the writes performed in the context of the current connection. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of replicas reached by all the writes performed in the context of the current connection. + +{{< /multitabs >}} diff --git a/content/commands/waitaof.md b/content/commands/waitaof.md index e6d5754b6..7a6f143de 100644 --- a/content/commands/waitaof.md +++ b/content/commands/waitaof.md @@ -101,3 +101,21 @@ In the above example, the first call to `WAITAOF` does not use a timeout and ask In the second attempt we instead specify a timeout, and ask for the write to be confirmed as fsynced by a single replica. Since there are no connected replicas, the `WAITAOF` command unblocks after one second and again returns [1, 0], indicating the write has been fsynced on the local Redis but no replicas. + +## Return information + +{{< multitabs id="waitaof-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): The command returns an array of two integers: +1. The first is the number of local Redises (0 or 1) that have fsynced to AOF all writes performed in the context of the current connection +2. The second is the number of replicas that have acknowledged doing the same. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): The command returns an array of two integers: +1. The first is the number of local Redises (0 or 1) that have fsynced to AOF all writes performed in the context of the current connection +2. The second is the number of replicas that have acknowledged doing the same. + +{{< /multitabs >}} diff --git a/content/commands/watch.md b/content/commands/watch.md index 5e6bd0781..dfce5d625 100644 --- a/content/commands/watch.md +++ b/content/commands/watch.md @@ -52,3 +52,17 @@ Marks the given keys to be watched for conditional execution of a [transaction][tt]. [tt]: /develop/interact/transactions + +## Return information + +{{< multitabs id="watch-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/xack.md b/content/commands/xack.md index 6a1b42644..dc62cefba 100644 --- a/content/commands/xack.md +++ b/content/commands/xack.md @@ -77,3 +77,17 @@ Redis server. redis> XACK mystream mygroup 1526569495631-0 (integer) 1 ``` + +## Return information + +{{< multitabs id="xack-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged. + +{{< /multitabs >}} diff --git a/content/commands/xadd.md b/content/commands/xadd.md index 20b5ebfb2..363527f12 100644 --- a/content/commands/xadd.md +++ b/content/commands/xadd.md @@ -204,3 +204,20 @@ XLEN mystream XRANGE mystream - + {{% /redis-cli %}} +## Return information + +{{< multitabs id="xadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The ID of the added entry. The ID is the one automatically generated if an asterisk (`*`) is passed as the _id_ argument, otherwise the command just returns the same ID specified by the user during insertion. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the NOMKSTREAM option is given and the key doesn't exist. + +-tab-sep- + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The ID of the added entry. The ID is the one automatically generated if an asterisk (`*`) is passed as the _id_ argument, otherwise the command just returns the same ID specified by the user during insertion. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the NOMKSTREAM option is given and the key doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/xautoclaim.md b/content/commands/xautoclaim.md index 88538eb21..6cd045c70 100644 --- a/content/commands/xautoclaim.md +++ b/content/commands/xautoclaim.md @@ -118,3 +118,23 @@ In the above example, we attempt to claim up to 25 entries that are pending and The consumer "Alice" from the "mygroup" group acquires ownership of these messages. Note that the stream ID returned in the example is `0-0`, indicating that the entire stream was scanned. We can also see that `XAUTOCLAIM` did not stumble upon any deleted messages (the third reply element is an empty array). + +## Return information + +{{< multitabs id="xautoclaim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays), specifically, an array with three elements: +1. A stream ID to be used as the _start_ argument for the next call to XAUTOCLAIM. +2. An [Array reply](../../develop/reference/protocol-spec#arrays) containing all the successfully claimed messages in the same format as `XRANGE`. +3. An [Array reply](../../develop/reference/protocol-spec#arrays) containing message IDs that no longer exist in the stream, and were deleted from the PEL in which they were found. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays), specifically, an array with three elements: +1. A stream ID to be used as the _start_ argument for the next call to XAUTOCLAIM. +2. An [Array reply](../../develop/reference/protocol-spec#arrays) containing all the successfully claimed messages in the same format as `XRANGE`. +3. An [Array reply](../../develop/reference/protocol-spec#arrays) containing message IDs that no longer exist in the stream, and were deleted from the PEL in which they were found. + +{{< /multitabs >}} diff --git a/content/commands/xclaim.md b/content/commands/xclaim.md index 58284b70d..e309cd6e9 100644 --- a/content/commands/xclaim.md +++ b/content/commands/xclaim.md @@ -143,3 +143,21 @@ useful to normal users: ``` In the above example we claim the message with ID `1526569498055-0`, only if the message is idle for at least one hour without the original consumer or some other consumer making progresses (acknowledging or claiming it), and assigns the ownership to the consumer `Alice`. + +## Return information + +{{< multitabs id="xclaim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): when the _JUSTID_ option is specified, an array of IDs of messages successfully claimed. +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of stream entries, each of which contains an array of two elements, the entry ID and the entry data itself. + +-tab-sep- + +Any of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): when the _JUSTID_ option is specified, an array of IDs of messages successfully claimed. +* [Array reply](../../develop/reference/protocol-spec#arrays): an array of stream entries, each of which contains an array of two elements, the entry ID and the entry data itself. + +{{< /multitabs >}} diff --git a/content/commands/xdel.md b/content/commands/xdel.md index c5d3877d1..04a6862b6 100644 --- a/content/commands/xdel.md +++ b/content/commands/xdel.md @@ -98,3 +98,17 @@ not a good idea to add such complexity. 2) 1) "c" 2) "3" ``` + +## Return information + +{{< multitabs id="xdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries that were deleted. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries that were deleted. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-create.md b/content/commands/xgroup-create.md index b2a270aaf..368119558 100644 --- a/content/commands/xgroup-create.md +++ b/content/commands/xgroup-create.md @@ -93,3 +93,17 @@ To enable consumer group lag tracking, specify the optional `entries_read` named An arbitrary ID is any ID that isn't the ID of the stream's first entry, last entry, or zero ("0-0") ID. Use it to find out how many entries are between the arbitrary ID (excluding it) and the stream's last entry. Set the `entries_read` the stream's `entries_added` subtracted by the number of entries. + +## Return information + +{{< multitabs id="xgroup-create-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-createconsumer.md b/content/commands/xgroup-createconsumer.md index bf5ec547a..1e3988a2f 100644 --- a/content/commands/xgroup-createconsumer.md +++ b/content/commands/xgroup-createconsumer.md @@ -56,3 +56,17 @@ Create a consumer named `` in the consumer group `` of Consumers are also created automatically whenever an operation, such as [`XREADGROUP`]({{< relref "/commands/xreadgroup" >}}), references a consumer that doesn't exist. This is valid for [`XREADGROUP`]({{< relref "/commands/xreadgroup" >}}) only when there is data in the stream. + +## Return information + +{{< multitabs id="xgroup-createconsumer-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of created consumers, either 0 or 1. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of created consumers, either 0 or 1. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-delconsumer.md b/content/commands/xgroup-delconsumer.md index 0d4077976..1c16f71e3 100644 --- a/content/commands/xgroup-delconsumer.md +++ b/content/commands/xgroup-delconsumer.md @@ -57,3 +57,17 @@ Sometimes it may be useful to remove old consumers since they are no longer used Note, however, that any pending messages that the consumer had will become unclaimable after it was deleted. It is strongly recommended, therefore, that any pending messages are claimed or acknowledged prior to deleting the consumer from the group. + +## Return information + +{{< multitabs id="xgroup-delconsumer-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-destroy.md b/content/commands/xgroup-destroy.md index 84f97292e..5df152186 100644 --- a/content/commands/xgroup-destroy.md +++ b/content/commands/xgroup-destroy.md @@ -52,3 +52,17 @@ title: XGROUP DESTROY The `XGROUP DESTROY` command completely destroys a consumer group. The consumer group will be destroyed even if there are active consumers, and pending messages, so make sure to call this command only when really needed. + +## Return information + +{{< multitabs id="xgroup-destroy-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of destroyed consumer groups, either 0 or 1. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of destroyed consumer groups, either 0 or 1. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-help.md b/content/commands/xgroup-help.md index dfa9272bc..410607078 100644 --- a/content/commands/xgroup-help.md +++ b/content/commands/xgroup-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: XGROUP HELP --- The `XGROUP HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="xgroup-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/xgroup-setid.md b/content/commands/xgroup-setid.md index 00a46c2e3..e4c0fa495 100644 --- a/content/commands/xgroup-setid.md +++ b/content/commands/xgroup-setid.md @@ -78,3 +78,17 @@ The optional `entries_read` argument can be specified to enable consumer group l An arbitrary ID is any ID that isn't the ID of the stream's first entry, its last entry or the zero ("0-0") ID. This can be useful you know exactly how many entries are between the arbitrary ID (excluding it) and the stream's last entry. In such cases, the `entries_read` can be set to the stream's `entries_added` subtracted with the number of entries. + +## Return information + +{{< multitabs id="xgroup-setid-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/xinfo-consumers.md b/content/commands/xinfo-consumers.md index 0fbfcb6d6..ffec909f6 100644 --- a/content/commands/xinfo-consumers.md +++ b/content/commands/xinfo-consumers.md @@ -86,3 +86,17 @@ In 7.2.0, **inactive** was added and **idle** was changed to denote the time pas 7) inactive 8) (integer) 993841998 ``` + +## Return information + +{{< multitabs id="xinfo-consumers-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes. + +{{< /multitabs >}} diff --git a/content/commands/xinfo-groups.md b/content/commands/xinfo-groups.md index 51c8382b6..c696c47ee 100644 --- a/content/commands/xinfo-groups.md +++ b/content/commands/xinfo-groups.md @@ -118,3 +118,17 @@ Once the consumer group delivers the last message in the stream to its members, 11) "lag" 12) (integer) 1 ``` + +## Return information + +{{< multitabs id="xinfo-groups-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumer groups. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumer groups. + +{{< /multitabs >}} diff --git a/content/commands/xinfo-help.md b/content/commands/xinfo-help.md index a908d9bc5..95989bd93 100644 --- a/content/commands/xinfo-help.md +++ b/content/commands/xinfo-help.md @@ -28,3 +28,17 @@ syntax_str: '' title: XINFO HELP --- The `XINFO HELP` command returns a helpful text describing the different subcommands. + +## Return information + +{{< multitabs id="xinfo-help-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions. + +{{< /multitabs >}} diff --git a/content/commands/xinfo-stream.md b/content/commands/xinfo-stream.md index b3ba12a91..144b0996e 100644 --- a/content/commands/xinfo-stream.md +++ b/content/commands/xinfo-stream.md @@ -215,3 +215,21 @@ OK 2) (integer) 1638125133432 3) (integer) 1 ``` + +## Return information + +{{< multitabs id="xinfo-stream-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): when the _FULL_ argument is used, a list of information about a stream in summary form. +* [Array reply](../../develop/reference/protocol-spec#arrays): when the _FULL_ argument is used, a list of information about a stream in extended form. + +-tab-sep- + +One of the following: +* [Map reply](../../develop/reference/protocol-spec#maps): when the _FULL_ argument was not given, a list of information about a stream in summary form. +* [Map reply](../../develop/reference/protocol-spec#maps): when the _FULL_ argument was given, a list of information about a stream in extended form. + +{{< /multitabs >}} diff --git a/content/commands/xlen.md b/content/commands/xlen.md index 54e7bfb7d..bbedf22b0 100644 --- a/content/commands/xlen.md +++ b/content/commands/xlen.md @@ -64,3 +64,16 @@ XADD mystream * item 3 XLEN mystream {{% /redis-cli %}} +## Return information + +{{< multitabs id="xlen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries of the stream at _key_. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries of the stream at _key_. + +{{< /multitabs >}} diff --git a/content/commands/xpending.md b/content/commands/xpending.md index e1f72bac2..3647ff78d 100644 --- a/content/commands/xpending.md +++ b/content/commands/xpending.md @@ -211,3 +211,17 @@ The `XPENDING` command allows iterating over the pending entries just like prefixing the ID of the last-read pending entry with the `(` character that denotes an open (exclusive) range, and proving it to the subsequent call to the command. + +## Return information + +{{< multitabs id="xpending-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): different data depending on the way XPENDING is called, as explained on this page. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): different data depending on the way XPENDING is called, as explained on this page. + +{{< /multitabs >}} diff --git a/content/commands/xrange.md b/content/commands/xrange.md index 90ce30ba1..7c1ae5c5f 100644 --- a/content/commands/xrange.md +++ b/content/commands/xrange.md @@ -274,3 +274,16 @@ XLEN writers XRANGE writers - + COUNT 2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="xrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of stream entries with IDs matching the specified range. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of stream entries with IDs matching the specified range. + +{{< /multitabs >}} diff --git a/content/commands/xread.md b/content/commands/xread.md index 2ca5dc36f..cf383d96c 100644 --- a/content/commands/xread.md +++ b/content/commands/xread.md @@ -290,3 +290,21 @@ data to the stream. Reading the [Redis Streams introduction]({{< relref "/develop/data-types/streams" >}}) is highly suggested in order to understand more about the streams overall behavior and semantics. + +## Return information + +{{< multitabs id="xread-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is an array composed of a two elements containing the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served. + +-tab-sep- + +One of the following: +* [Map reply](../../develop/reference/protocol-spec#maps): A map of key-value elements where each element is composed of the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served. + +{{< /multitabs >}} diff --git a/content/commands/xreadgroup.md b/content/commands/xreadgroup.md index 0baa255ee..94916c277 100644 --- a/content/commands/xreadgroup.md +++ b/content/commands/xreadgroup.md @@ -224,3 +224,21 @@ OK Reading the [Redis Streams introduction]({{< relref "/develop/data-types/streams" >}}) is highly suggested in order to understand more about the streams overall behavior and semantics. + +## Return information + +{{< multitabs id="xreadgroup-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is an array composed of a two elements containing the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served. + +-tab-sep- + +One of the following: +* [Map reply](../../develop/reference/protocol-spec#maps): A map of key-value elements where each element is composed of the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`. +* [Null reply](../../develop/reference/protocol-spec#nulls): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served. + +{{< /multitabs >}} diff --git a/content/commands/xrevrange.md b/content/commands/xrevrange.md index a93e6498c..ba5bee0c5 100644 --- a/content/commands/xrevrange.md +++ b/content/commands/xrevrange.md @@ -88,3 +88,16 @@ XLEN writers XREVRANGE writers + - COUNT 1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="xrevrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): The command returns the entries with IDs matching the specified range. The returned entries are complete, which means that the ID and all the fields they are composed of are returned. Moreover, the entries are returned with their fields and values in the same order as `XADD` added them. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): The command returns the entries with IDs matching the specified range. The returned entries are complete, which means that the ID and all the fields they are composed of are returned. Moreover, the entries are returned with their fields and values in the same order as `XADD` added them. + +{{< /multitabs >}} diff --git a/content/commands/xsetid.md b/content/commands/xsetid.md index 941e2817c..dcfc0f80d 100644 --- a/content/commands/xsetid.md +++ b/content/commands/xsetid.md @@ -66,4 +66,18 @@ syntax_str: "last-id [ENTRIESADDED\_entries-added] [MAXDELETEDID\_max-deleted-id title: XSETID --- The `XSETID` command is an internal command. -It is used by a Redis master to replicate the last delivered ID of streams. \ No newline at end of file +It is used by a Redis master to replicate the last delivered ID of streams. + +## Return information + +{{< multitabs id="xsetid-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +-tab-sep- + +[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. + +{{< /multitabs >}} diff --git a/content/commands/xtrim.md b/content/commands/xtrim.md index 38632ac23..9086919bd 100644 --- a/content/commands/xtrim.md +++ b/content/commands/xtrim.md @@ -142,3 +142,16 @@ XTRIM mystream MAXLEN 2 XRANGE mystream - + {{% /redis-cli %}} +## Return information + +{{< multitabs id="xtrim-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): The number of entries deleted from the stream. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): The number of entries deleted from the stream. + +{{< /multitabs >}} diff --git a/content/commands/zadd.md b/content/commands/zadd.md index bb7c1be31..3d49673bb 100644 --- a/content/commands/zadd.md +++ b/content/commands/zadd.md @@ -194,3 +194,25 @@ ZADD myzset 1 "uno" ZADD myzset 2 "two" 3 "three" ZRANGE myzset 0 -1 WITHSCORES {{% /redis-cli %}} + +## Return information + +{{< multitabs id="zadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +Any of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the operation was aborted because of a conflict with one of the _XX/NX/LT/GT_ options. +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new members when the _CH_ option is not used. +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new or updated members when the _CH_ option is used. +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the updated score of the member when the _INCR_ option is used. + +-tab-sep- + +Any of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the operation was aborted because of a conflict with one of the _XX/NX/LT/GT_ options. +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new members when the _CH_ option is not used. +* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new or updated members when the _CH_ option is used. +* [Double reply](../../develop/reference/protocol-spec#doubles): the updated score of the member when the _INCR_ option is used. + +{{< /multitabs >}} diff --git a/content/commands/zcard.md b/content/commands/zcard.md index 2c4c9c524..69d3a068a 100644 --- a/content/commands/zcard.md +++ b/content/commands/zcard.md @@ -56,3 +56,16 @@ ZADD myzset 2 "two" ZCARD myzset {{% /redis-cli %}} +## Return information + +{{< multitabs id="zcard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of members) of the sorted set, or 0 if the key doesn't exist. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of members) of the sorted set, or 0 if the key doesn't exist. + +{{< /multitabs >}} diff --git a/content/commands/zcount.md b/content/commands/zcount.md index 76fe1e435..6a3ca313e 100644 --- a/content/commands/zcount.md +++ b/content/commands/zcount.md @@ -71,3 +71,16 @@ ZCOUNT myzset -inf +inf ZCOUNT myzset (1 3 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zcount-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zdiff.md b/content/commands/zdiff.md index 835a975e8..ff0b652bf 100644 --- a/content/commands/zdiff.md +++ b/content/commands/zdiff.md @@ -72,3 +72,16 @@ ZDIFF 2 zset1 zset2 ZDIFF 2 zset1 zset2 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zdiff-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the difference including, optionally, scores when the _WITHSCORES_ option is used. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the difference including, optionally, scores when the _WITHSCORES_ option is used. + +{{< /multitabs >}} diff --git a/content/commands/zdiffstore.md b/content/commands/zdiffstore.md index 20befe941..ac6b46a98 100644 --- a/content/commands/zdiffstore.md +++ b/content/commands/zdiffstore.md @@ -89,3 +89,16 @@ ZDIFFSTORE out 2 zset1 zset2 ZRANGE out 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zdiffstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at _destination_. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at _destination_. + +{{< /multitabs >}} diff --git a/content/commands/zincrby.md b/content/commands/zincrby.md index 536562959..f00758668 100644 --- a/content/commands/zincrby.md +++ b/content/commands/zincrby.md @@ -76,3 +76,16 @@ ZINCRBY myzset 2 "one" ZRANGE myzset 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zincrby-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the new score of _member_ as a double precision floating point number. + +-tab-sep- + +[Double reply](../../develop/reference/protocol-spec#doubles): the new score of _member_. + +{{< /multitabs >}} diff --git a/content/commands/zinter.md b/content/commands/zinter.md index bad551d56..b21125b9b 100644 --- a/content/commands/zinter.md +++ b/content/commands/zinter.md @@ -99,3 +99,16 @@ ZINTER 2 zset1 zset2 ZINTER 2 zset1 zset2 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zinter-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the intersection including, optionally, scores when the _WITHSCORES_ option is used. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the intersection including, optionally, scores when the _WITHSCORES_ option is used. + +{{< /multitabs >}} diff --git a/content/commands/zintercard.md b/content/commands/zintercard.md index e2c14a492..0bca96042 100644 --- a/content/commands/zintercard.md +++ b/content/commands/zintercard.md @@ -78,3 +78,16 @@ ZINTERCARD 2 zset1 zset2 ZINTERCARD 2 zset1 zset2 LIMIT 1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zintercard-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting intersection. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting intersection. + +{{< /multitabs >}} diff --git a/content/commands/zinterstore.md b/content/commands/zinterstore.md index 7d84a22a0..edf1a67be 100644 --- a/content/commands/zinterstore.md +++ b/content/commands/zinterstore.md @@ -121,3 +121,16 @@ ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 ZRANGE out 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zinterstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at the _destination_. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at the _destination_. + +{{< /multitabs >}} diff --git a/content/commands/zlexcount.md b/content/commands/zlexcount.md index 98e5ad2b7..d0ed867f8 100644 --- a/content/commands/zlexcount.md +++ b/content/commands/zlexcount.md @@ -69,3 +69,16 @@ ZLEXCOUNT myzset - + ZLEXCOUNT myzset [b [f {{% /redis-cli %}} +## Return information + +{{< multitabs id="zlexcount-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zmpop.md b/content/commands/zmpop.md index e3382c5b7..9797baa86 100644 --- a/content/commands/zmpop.md +++ b/content/commands/zmpop.md @@ -100,3 +100,20 @@ ZRANGE myzset2 0 -1 WITHSCORES EXISTS myzset myzset2 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zmpop-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): A two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped. +* [Array reply](../../develop/reference/protocol-spec#arrays): A two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score. + +{{< /multitabs >}} diff --git a/content/commands/zmscore.md b/content/commands/zmscore.md index 53ef4d426..1bff1926f 100644 --- a/content/commands/zmscore.md +++ b/content/commands/zmscore.md @@ -62,3 +62,20 @@ ZADD myzset 2 "two" ZMSCORE myzset "one" "two" "nofield" {{% /redis-cli %}} +## Return information + +{{< multitabs id="zmscore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the member does not exist in the sorted set. +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) _member_ scores as double-precision floating point numbers. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the member does not exist in the sorted set. +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of [Double reply](../../develop/reference/protocol-spec#doubles) _member_ scores as double-precision floating point numbers. + +{{< /multitabs >}} diff --git a/content/commands/zpopmax.md b/content/commands/zpopmax.md index f316dd53d..921664158 100644 --- a/content/commands/zpopmax.md +++ b/content/commands/zpopmax.md @@ -71,3 +71,16 @@ ZADD myzset 3 "three" ZPOPMAX myzset {{% /redis-cli %}} +## Return information + +{{< multitabs id="zpopmax-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores. + +{{< /multitabs >}} diff --git a/content/commands/zpopmin.md b/content/commands/zpopmin.md index 736ffb08f..20072402d 100644 --- a/content/commands/zpopmin.md +++ b/content/commands/zpopmin.md @@ -71,3 +71,16 @@ ZADD myzset 3 "three" ZPOPMIN myzset {{% /redis-cli %}} +## Return information + +{{< multitabs id="zpopmin-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores. + +{{< /multitabs >}} diff --git a/content/commands/zrandmember.md b/content/commands/zrandmember.md index dc43e7c31..256288af9 100644 --- a/content/commands/zrandmember.md +++ b/content/commands/zrandmember.md @@ -92,3 +92,19 @@ When the `count` is a negative value, the behavior changes as follows: * Repeating elements are possible. * Exactly `count` elements, or an empty array if the sorted set is empty (non-existing key), are always returned. * The order of elements in the reply is truly random. + +## Return information + +{{< multitabs id="zrandmember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or [Nil reply](../../develop/reference/protocol-spec#bulk-strings) when _key_ doesn't exist. +[Array reply](../../develop/reference/protocol-spec#arrays): when the additional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. If the _WITHSCORES_ modifier is used, the reply is a list of members and their scores from the sorted set. + +-tab-sep- + +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or [Null reply](../../develop/reference/protocol-spec#nulls) when _key_ doesn't exist. +[Array reply](../../develop/reference/protocol-spec#arrays): when the additional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. If the _WITHSCORES_ modifier is used, the reply is a list of members and their scores from the sorted set. + +{{< /multitabs >}} diff --git a/content/commands/zrange.md b/content/commands/zrange.md index dc75b36a4..55afc1416 100644 --- a/content/commands/zrange.md +++ b/content/commands/zrange.md @@ -238,4 +238,18 @@ ZADD myzset 1 "one" 2 "two" 3 "three" ZRANGE myzset 0 -1 ZRANGE myzset 2 3 ZRANGE myzset -2 -1 -{{% /redis-cli %}} \ No newline at end of file +{{% /redis-cli %}} + +## Return information + +{{< multitabs id="zrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range with, optionally, their scores when the _WITHSCORES_ option is given. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range with, optionally, their scores when the _WITHSCORES_ option is given. + +{{< /multitabs >}} diff --git a/content/commands/zrangebylex.md b/content/commands/zrangebylex.md index 1c3232cef..33d6f52a4 100644 --- a/content/commands/zrangebylex.md +++ b/content/commands/zrangebylex.md @@ -126,3 +126,16 @@ ZRANGEBYLEX myzset - (c ZRANGEBYLEX myzset [aaa (g {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrangebylex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified score range. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zrangebyscore.md b/content/commands/zrangebyscore.md index 56f6df8c9..0445aa216 100644 --- a/content/commands/zrangebyscore.md +++ b/content/commands/zrangebyscore.md @@ -175,3 +175,17 @@ just compute a random number between 0 and 1 (which is like calling `rand()` in most languages), so you can just do: RANDOM_ELE = ZRANGEBYSCORE key RAND() +inf LIMIT 0 1 + +## Return information + +{{< multitabs id="zrangebyscore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members with, optionally, their scores in the specified score range. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members with, optionally, their scores in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zrangestore.md b/content/commands/zrangestore.md index d7710fabb..a161fa036 100644 --- a/content/commands/zrangestore.md +++ b/content/commands/zrangestore.md @@ -108,3 +108,16 @@ ZRANGESTORE dstzset srczset 2 -1 ZRANGE dstzset 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrangestore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set. + +{{< /multitabs >}} diff --git a/content/commands/zrank.md b/content/commands/zrank.md index feb1deb2e..5b142418a 100644 --- a/content/commands/zrank.md +++ b/content/commands/zrank.md @@ -79,3 +79,22 @@ ZRANK myzset "three" WITHSCORE ZRANK myzset "four" WITHSCORE {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrank-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or the member does not exist in the sorted set. +* [Integer reply](../../develop/reference/protocol-spec#integers): the rank of the member when _WITHSCORE_ is not used. +* [Array reply](../../develop/reference/protocol-spec#arrays): the rank and score of the member when _WITHSCORE_ is used. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or the member does not exist in the sorted set. +* [Integer reply](../../develop/reference/protocol-spec#integers): the rank of the member when _WITHSCORE_ is not used. +* [Array reply](../../develop/reference/protocol-spec#arrays): the rank and score of the member when _WITHSCORE_ is used. + +{{< /multitabs >}} diff --git a/content/commands/zrem.md b/content/commands/zrem.md index 816c19149..78f5e0894 100644 --- a/content/commands/zrem.md +++ b/content/commands/zrem.md @@ -71,3 +71,16 @@ ZREM myzset "two" ZRANGE myzset 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrem-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed from the sorted set, not including non-existing members. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed from the sorted set, not including non-existing members. + +{{< /multitabs >}} diff --git a/content/commands/zremrangebylex.md b/content/commands/zremrangebylex.md index cf882d561..af1d754df 100644 --- a/content/commands/zremrangebylex.md +++ b/content/commands/zremrangebylex.md @@ -68,3 +68,16 @@ ZREMRANGEBYLEX myzset [alpha [omega ZRANGE myzset 0 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zremrangebylex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed. + +{{< /multitabs >}} diff --git a/content/commands/zremrangebyrank.md b/content/commands/zremrangebyrank.md index e493c8b9c..2849e01d9 100644 --- a/content/commands/zremrangebyrank.md +++ b/content/commands/zremrangebyrank.md @@ -73,3 +73,16 @@ ZREMRANGEBYRANK myzset 0 1 ZRANGE myzset 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zremrangebyrank-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed. + +{{< /multitabs >}} diff --git a/content/commands/zremrangebyscore.md b/content/commands/zremrangebyscore.md index 8390887bb..281d6421b 100644 --- a/content/commands/zremrangebyscore.md +++ b/content/commands/zremrangebyscore.md @@ -67,3 +67,16 @@ ZREMRANGEBYSCORE myzset -inf (2 ZRANGE myzset 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zremrangebyscore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed. + +{{< /multitabs >}} diff --git a/content/commands/zrevrange.md b/content/commands/zrevrange.md index f8e391c1a..c607c443f 100644 --- a/content/commands/zrevrange.md +++ b/content/commands/zrevrange.md @@ -79,3 +79,16 @@ ZREVRANGE myzset 2 3 ZREVRANGE myzset -2 -1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrevrange-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range, optionally with their scores if _WITHSCORE_ was used. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range, optionally with their scores if _WITHSCORE_ was used. + +{{< /multitabs >}} diff --git a/content/commands/zrevrangebylex.md b/content/commands/zrevrangebylex.md index d97134512..cabbe2845 100644 --- a/content/commands/zrevrangebylex.md +++ b/content/commands/zrevrangebylex.md @@ -84,3 +84,16 @@ ZREVRANGEBYLEX myzset (c - ZREVRANGEBYLEX myzset (g [aaa {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrevrangebylex-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified score range. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): List of the elements in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zrevrangebyscore.md b/content/commands/zrevrangebyscore.md index 902673a80..9b829f988 100644 --- a/content/commands/zrevrangebyscore.md +++ b/content/commands/zrevrangebyscore.md @@ -100,3 +100,16 @@ ZREVRANGEBYSCORE myzset 2 (1 ZREVRANGEBYSCORE myzset (2 (1 {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrevrangebyscore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members and, optionally, their scores in the specified score range. + +-tab-sep- + +* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members and, optionally, their scores in the specified score range. + +{{< /multitabs >}} diff --git a/content/commands/zrevrank.md b/content/commands/zrevrank.md index f1ddbd708..dedbc1a21 100644 --- a/content/commands/zrevrank.md +++ b/content/commands/zrevrank.md @@ -79,3 +79,22 @@ ZREVRANK myzset "three" WITHSCORE ZREVRANK myzset "four" WITHSCORE {{% /redis-cli %}} +## Return information + +{{< multitabs id="zrevrank-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or the member does not exist in the sorted set. +* [Integer reply](../../develop/reference/protocol-spec#integers): The rank of the member when _WITHSCORE_ is not used. +* [Array reply](../../develop/reference/protocol-spec#arrays): The rank and score of the member when _WITHSCORE_ is used. + +-tab-sep- + +One of the following: +* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or the member does not exist in the sorted set. +* [Integer reply](../../develop/reference/protocol-spec#integers): The rank of the member when _WITHSCORE_ is not used. +* [Array reply](../../develop/reference/protocol-spec#arrays): The rank and score of the member when _WITHSCORE_ is used. + +{{< /multitabs >}} diff --git a/content/commands/zscan.md b/content/commands/zscan.md index c41659913..14e6e41de 100644 --- a/content/commands/zscan.md +++ b/content/commands/zscan.md @@ -63,3 +63,17 @@ syntax_str: "cursor [MATCH\_pattern] [COUNT\_count]" title: ZSCAN --- See [`SCAN`]({{< relref "/commands/scan" >}}) for `ZSCAN` documentation. + +## Return information + +{{< multitabs id="zscan-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form. + +{{< /multitabs >}} diff --git a/content/commands/zscore.md b/content/commands/zscore.md index bc1063e8b..4f85750e6 100644 --- a/content/commands/zscore.md +++ b/content/commands/zscore.md @@ -61,3 +61,20 @@ ZADD myzset 1 "one" ZSCORE myzset "one" {{% /redis-cli %}} +## Return information + +{{< multitabs id="zscore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the score of the member (a double-precision floating point number), represented as a string. +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _member_ does not exist in the sorted set, or the key does not exist. + +-tab-sep- + +One of the following: +* [Double reply](../../develop/reference/protocol-spec#doubles): the score of the member (a double-precision floating point number). +* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _member_ does not exist in the sorted set, or the key does not exist. + +{{< /multitabs >}} diff --git a/content/commands/zunion.md b/content/commands/zunion.md index 5719d17c9..fdc910c4a 100644 --- a/content/commands/zunion.md +++ b/content/commands/zunion.md @@ -98,3 +98,16 @@ ZUNION 2 zset1 zset2 ZUNION 2 zset1 zset2 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zunion-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array reply](../../develop/reference/protocol-spec#arrays): the result of the union with, optionally, their scores when _WITHSCORES_ is used. + +-tab-sep- + +[Array reply](../../develop/reference/protocol-spec#arrays): the result of the union with, optionally, their scores when _WITHSCORES_ is used. + +{{< /multitabs >}} diff --git a/content/commands/zunionstore.md b/content/commands/zunionstore.md index 6bf11cc7c..d953fd97c 100644 --- a/content/commands/zunionstore.md +++ b/content/commands/zunionstore.md @@ -128,3 +128,16 @@ ZUNIONSTORE out 2 zset1 zset2 WEIGHTS 2 3 ZRANGE out 0 -1 WITHSCORES {{% /redis-cli %}} +## Return information + +{{< multitabs id="zunionstore-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set. + +-tab-sep- + +[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set. + +{{< /multitabs >}} diff --git a/data/resp2_replies.json b/data/resp2_replies.json deleted file mode 100644 index 3bb5f0067..000000000 --- a/data/resp2_replies.json +++ /dev/null @@ -1,1465 +0,0 @@ -{ - "ACL": [], - "ACL CAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given." - ], - "ACL DELUSER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist." - ], - "ACL DRYRUN": [ - "Any of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command." - ], - "ACL GENPASS": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4." - ], - "ACL GETUSER": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of ACL rule definitions for the user.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if user does not exist." - ], - "ACL HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "ACL LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements." - ], - "ACL LOG": [ - "When called to show security events:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.", - "When called with `RESET`:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared." - ], - "ACL SAVE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.", - "The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file." - ], - "ACL SETUSER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.", - "If the rules contain errors, the error is returned." - ], - "ACL USERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users." - ], - "ACL WHOAMI": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection." - ], - "ACL-LOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "", - "The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.", - "Finally, the command will fail if the server is not configured to use an external ACL file." - ], - "APPEND": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation." - ], - "ASKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "AUTH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid." - ], - "BGREWRITEAOF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.", - "", - "The command may reply with an error in certain cases, as documented above." - ], - "BGSAVE": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`." - ], - "BITCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1." - ], - "BITFIELD": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if OVERFLOW FAIL was given and overflows or underflows are detected." - ], - "BITFIELD_RO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position." - ], - "BITOP": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the size of the string stored in the destination key is equal to the size of the longest input string." - ], - "BITPOS": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the position of the first bit set to 1 or 0 according to the request", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1`. In case the `bit` argument is 1 and the string is empty or composed of just zero bytes", - "", - "If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.", - "", - "If we look for clear bits (the bit argument is 0) and the string only contains bits set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value `0xff` the command `BITPOS key 0` will return 24, since up to bit 23 all the bits are 1.", - "", - "The function considers the right of the string as padded with zeros if you look for clear bits and specify no range or the _start_ argument **only**.", - "", - "However, this behavior changes if you are looking for clear bits and specify a range with both _start_ and _end_.", - "If a clear bit isn't found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range." - ], - "BLMOVE": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from the _source_ and pushed to the _destination_.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the operation timed-out" - ], - "BLMPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ is reached.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element being an array of the popped elements." - ], - "BLPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): no element could be popped and the timeout expired", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element." - ], - "BRPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): no element could be popped and the timeout expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element" - ], - "BRPOPLPUSH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from _source_ and pushed to _destination_.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the timeout is reached." - ], - "BZMPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score." - ], - "BZPOPMAX": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score." - ], - "BZPOPMIN": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped and the _timeout_ expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score." - ], - "CLIENT": [], - "CLIENT CACHING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the argument is not \"yes\" or \"no\"." - ], - "CLIENT GETNAME": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the connection name of the current connection.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the connection name was not set." - ], - "CLIENT GETREDIR": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected." - ], - "CLIENT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "CLIENT ID": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client." - ], - "CLIENT INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a unique string for the current client, as described at the `CLIENT LIST` page." - ], - "CLIENT KILL": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called in 3 argument format and the connection has been closed.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): when called in filter/value format, the number of clients killed." - ], - "CLIENT LIST": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): information and statistics about client connections." - ], - "CLIENT NO-EVICT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLIENT NO-TOUCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLIENT PAUSE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the timeout is invalid." - ], - "CLIENT REPLY": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called with `ON`. When called with either `OFF` or `SKIP` sub-commands, no reply is made." - ], - "CLIENT SETINFO": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set." - ], - "CLIENT SETNAME": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection name was successfully set." - ], - "CLIENT TRACKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection was successfully put in tracking mode or if the tracking mode was successfully disabled. Otherwise, an error is returned." - ], - "CLIENT TRACKINGINFO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of tracking information sections and their respective values." - ], - "CLIENT UNBLOCK": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the client was unblocked successfully.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the client wasn't unblocked." - ], - "CLIENT UNPAUSE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLUSTER": [], - "CLUSTER ADDSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER ADDSLOTSRANGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER BUMPEPOCH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `BUMPED` if the epoch was incremented.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `STILL` if the node already has the greatest configured epoch in the cluster." - ], - "CLUSTER COUNT-FAILURE-REPORTS": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of active failure reports for the node." - ], - "CLUSTER COUNTKEYSINSLOT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of keys in the specified hash slot, or an error if the hash slot is invalid." - ], - "CLUSTER DELSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER DELSLOTSRANGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER FAILOVER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a manual failover is going to be attempted. An error if the operation cannot be executed, for example if the client is connected to a node that is already a master." - ], - "CLUSTER FLUSHSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`" - ], - "CLUSTER FORGET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was executed successfully. Otherwise an error is returned." - ], - "CLUSTER GETKEYSINSLOT": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array with up to count elements." - ], - "CLUSTER HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "CLUSTER INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): A map between named fields and values in the form of `:` lines separated by newlines composed by the two bytes `CRLF`." - ], - "CLUSTER KEYSLOT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The hash slot number for the specified key" - ], - "CLUSTER LINKS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of maps where each map contains various attributes and their values of a cluster link." - ], - "CLUSTER MEET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned." - ], - "CLUSTER MYID": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node ID." - ], - "CLUSTER MYSHARDID": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node's shard ID." - ], - "CLUSTER NODES": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized cluster configuration." - ], - "CLUSTER REPLICAS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`." - ], - "CLUSTER REPLICATE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SAVECONFIG": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SET-CONFIG-EPOCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SETSLOT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): all the sub-commands return `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SHARDS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of a map of hash ranges and shard nodes describing individual shards." - ], - "CLUSTER SLAVES": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`." - ], - "CLUSTER SLOTS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): nested list of slot ranges with networking information." - ], - "COMMAND": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. The order of the commands in the array is random." - ], - "COMMAND COUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of commands returned by `COMMAND`." - ], - "COMMAND DOCS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a map, as a flattened array, where each key is a command name, and each value is the documentary information." - ], - "COMMAND GETKEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): list of keys from the given command." - ], - "COMMAND GETKEYSANDFLAGS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command and their usage flags." - ], - "COMMAND HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "COMMAND INFO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details." - ], - "COMMAND LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of command names." - ], - "CONFIG": [], - "CONFIG GET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of configuration parameters matching the provided arguments." - ], - "CONFIG HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "CONFIG RESETSTAT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CONFIG REWRITE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was rewritten properly. Otherwise an error is returned." - ], - "CONFIG SET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned." - ], - "COPY": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _source_ was copied.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _source_ was not copied." - ], - "DBSIZE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys in the currently-selected database." - ], - "DEBUG": [], - "DECR": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it." - ], - "DECRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it." - ], - "DEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were removed." - ], - "DISCARD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "DUMP": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The serialized value of the key.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the key does not exist." - ], - "ECHO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the given string." - ], - "EVAL": [ - "The return value depends on the script that was executed." - ], - "EVALSHA": [ - "The return value depends on the script that was executed." - ], - "EVALSHA_RO": [ - "The return value depends on the script that was executed." - ], - "EVAL_RO": [ - "The return value depends on the script that was executed." - ], - "EXEC": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): each element being the reply to each of the commands in the atomic transaction.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): the transaction was aborted because a `WATCH`ed key was touched." - ], - "EXISTS": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that exist from those specified as arguments." - ], - "EXPIRE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "EXPIREAT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "EXPIRETIME": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the expiration Unix timestamp in seconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "FAILOVER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a coordinated failover is in progress. An error if the operation cannot be executed." - ], - "FCALL": [ - "The return value depends on the function that was executed." - ], - "FCALL_RO": [ - "The return value depends on the function that was executed." - ], - "FLUSHALL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FLUSHDB": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION": [], - "FUNCTION DELETE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION DUMP": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload" - ], - "FUNCTION FLUSH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions" - ], - "FUNCTION KILL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): information about functions and libraries." - ], - "FUNCTION LOAD": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the library name that was loaded." - ], - "FUNCTION RESTORE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION STATS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): information about the function that's currently running and information about the available execution engines." - ], - "GEOADD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated)." - ], - "GEODIST": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): one or both of the elements are missing.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): distance as a double (represented as a string) in the specified units." - ], - "GEOHASH": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is the Geohash corresponding to each member name passed as an argument to the command." - ], - "GEOPOS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Nil reply](../../develop/reference/protocol-spec#bulk-strings) elements of the array." - ], - "GEORADIUS": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " 1. The distance from the center as a floating point number, in the same unit specified in the radius.", - " 1. The Geohash integer.", - " 1. The coordinates as a two items x,y array (longitude,latitude).", - "", - "For example, the command `GEORADIUS Sicily 15 37 200 km WITHCOORD WITHDIST` will return each item in the following way:", - "", - "`[\"Palermo\",\"190.4424\",[\"13.361389338970184\",\"38.115556395496299\"]]`" - ], - "GEORADIUSBYMEMBER": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEORADIUSBYMEMBER_RO": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEORADIUS_RO": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEOSEARCH": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEOSEARCHSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set" - ], - "GET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist." - ], - "GETBIT": [ - "The bit value stored at _offset_, one of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0`.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1`." - ], - "GETDEL": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or if the key's value type is not a string." - ], - "GETEX": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of `key`", - "[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if `key` does not exist." - ], - "GETRANGE": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." - ], - "GETSET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the old value stored at the key.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist." - ], - "HDEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were removed from the hash, excluding any specified but non-existing fields." - ], - "HELLO": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties.", - "[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist." - ], - "HEXISTS": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the hash does not contain the field, or the key does not exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the hash contains the field." - ], - "HEXPIRE": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX | XX | GT | LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE`/`HPEXPIRE` is called with 0 seconds/milliseconds or when `HEXPIREAT`/`HPEXPIREAT` is called with a past Unix time in seconds/milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HEXPIREAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HEXPIRETIME": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in seconds." - ], - "HGET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value associated with the field.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): If the field is not present in the hash or key does not exist." - ], - "HGETALL": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values, or an empty list when key does not exist." - ], - "HGETDEL": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." - ], - "HGETEX": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested." - ], - "HINCRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation." - ], - "HINCRBYFLOAT": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the field after the increment operation." - ], - "HKEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields in the hash, or an empty list when the key does not exist" - ], - "HLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields in the hash, or 0 when the key does not exist." - ], - "HMGET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested." - ], - "HMSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "HPERSIST": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` the expiration was removed." - ], - "HPEXPIRE": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HPEXPIREAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HPEXPIRETIME": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in milliseconds." - ], - "HPTTL": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in milliseconds." - ], - "HRANDFIELD": [ - "Any of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key doesn't exist", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a single, randomly selected field when the `count` option is not used", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list containing `count` fields when the `count` option is used, or an empty array if the key does not exists.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values when `count` and `WITHVALUES` were both used." - ], - "HSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a two-element array.", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned." - ], - "HSET": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added." - ], - "HSETEX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset." - ], - "HSETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the field is a new field in the hash and the value was set." - ], - "HSTRLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the string length of the value associated with the _field_, or zero when the _field_ isn't present in the hash or the _key_ doesn't exist at all." - ], - "HTTL": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in seconds." - ], - "HVALS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values in the hash, or an empty list when the key does not exist" - ], - "INCR": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment." - ], - "INCRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment." - ], - "INCRBYFLOAT": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key after the increment." - ], - "INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a map of info fields, one field per line in the form of `:` where the value can be a comma separated map like `=`. Also contains section header lines starting with `#` and blank lines.", - "", - "Lines can contain a section name (starting with a `#` character) or a property. All the properties are in the form of `field:value` terminated by `\\r\\n`." - ], - "KEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys matching _pattern_." - ], - "LASTSAVE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): UNIX TIME of the last DB save executed with success." - ], - "LATENCY": [], - "LATENCY DOCTOR": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a human readable latency analysis report." - ], - "LATENCY GRAPH": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Latency graph" - ], - "LATENCY HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "LATENCY HISTOGRAM": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets." - ], - "LATENCY HISTORY": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a two elements array representing the timestamp and the latency of the event." - ], - "LATENCY LATEST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements." - ], - "LATENCY RESET": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of event time series that were reset." - ], - "LCS": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the longest common subsequence.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the length of the longest common subsequence when _LEN_ is given.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array with the LCS length and all the ranges in both the strings when _IDX_ is given." - ], - "LINDEX": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when _index_ is out of range.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the requested element." - ], - "LINSERT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the list length after a successful insert operation.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when the key doesn't exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` when the pivot wasn't found." - ], - "LLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list." - ], - "LMOVE": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed." - ], - "LMPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped and the second element being an array of elements." - ], - "LOLWUT": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a string containing generative computer art and the Redis version." - ], - "LPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the first element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements." - ], - "LPOS": [ - "Any of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if there is no matching element.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): an integer representing the matching element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): If the COUNT option is given, an array of integers representing the matching elements (or an empty array if there are no matches)." - ], - "LPUSH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "LPUSHX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "LRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified range, or an empty array if the key doesn't exist." - ], - "LREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of removed elements." - ], - "LSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "LTRIM": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "MEMORY": [], - "MEMORY DOCTOR": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a memory problems report." - ], - "MEMORY HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions" - ], - "MEMORY MALLOC-STATS": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the memory allocator's internal statistics report" - ], - "MEMORY PURGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "MEMORY STATS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of memory usage metrics and their values." - ], - "MEMORY USAGE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the memory usage in bytes.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist." - ], - "MGET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values at the specified keys." - ], - "MIGRATE": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `NOKEY` when no keys were found in the source instance." - ], - "MODULE": [], - "MODULE HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "MODULE LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): list of loaded modules. Each element in the list represents a represents a module, and is in itself a list of property names and their values. The following properties is reported for each loaded module:", - "* name: the name of the module.", - "* ver: the version of the module." - ], - "MODULE LOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded." - ], - "MODULE LOADEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded." - ], - "MODULE UNLOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was unloaded." - ], - "MONITOR": [ - "**Non-standard return value**. Dumps the received commands in an infinite flow." - ], - "MOVE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was moved.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ wasn't moved." - ], - "MSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): always `OK` because `MSET` can't fail." - ], - "MSETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no key was set (at least one key already existed).", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the keys were set." - ], - "MULTI": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "OBJECT": [], - "OBJECT ENCODING": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key doesn't exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the encoding of the object." - ], - "OBJECT FREQ": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the counter's value.", - "[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist." - ], - "OBJECT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions" - ], - "OBJECT IDLETIME": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds.", - "[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist." - ], - "OBJECT REFCOUNT": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of references.", - "[Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _key_ doesn't exist." - ], - "PERSIST": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ does not exist or does not have an associated timeout.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout has been removed." - ], - "PEXPIRE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0`if the timeout was not set. For example, if the key doesn't exist, or the operation skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "PEXPIREAT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set. For example, if the key doesn't exist, or the operation was skipped due to the provided arguments." - ], - "PEXPIRETIME": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): Expiration Unix timestamp in milliseconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "PFADD": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if at least one HyperLogLog internal register was altered.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no HyperLogLog internal registers were altered." - ], - "PFCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the approximated number of unique elements observed via `PFADD`." - ], - "PFDEBUG": [], - "PFMERGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PFSELFTEST": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PING": [ - "Any of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument." - ], - "PSETEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `psubscribe` is pushed as a confirmation that the command succeeded." - ], - "PSYNC": [ - "**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master." - ], - "PTTL": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in milliseconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "PUBLISH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count." - ], - "PUBSUB": [], - "PUBSUB CHANNELS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern." - ], - "PUBSUB HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "PUBSUB NUMPAT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of patterns all the clients are subscribed to." - ], - "PUBSUB NUMSUB": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers" - ], - "PUBSUB SHARDCHANNELS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern." - ], - "PUBSUB SHARDNUMSUB": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per shard channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers." - ], - "PUNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `punsubscribe` is pushed as a confirmation that the command succeeded." - ], - "QUIT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): OK." - ], - "RANDOMKEY": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when the database is empty.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a random key in database." - ], - "READONLY": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "READWRITE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RENAME": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RENAMENX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was renamed to _newkey_.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _newkey_ already exists." - ], - "REPLCONF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "REPLICAOF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `RESET`." - ], - "RESTORE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RESTORE-ASKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "ROLE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): where the first element is one of `master`, `slave`, or `sentinel`, and the additional elements are role-specific as illustrated above." - ], - "RPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the last element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements." - ], - "RPOPLPUSH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the source list is empty." - ], - "RPUSH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "RPUSHX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "SADD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements that were added to the set, not including all the elements already present in the set." - ], - "SAVE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements.", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned keys." - ], - "SCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of elements) of the set, or `0` if the key does not exist." - ], - "SCRIPT": [], - "SCRIPT DEBUG": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT EXISTS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments." - ], - "SCRIPT FLUSH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "SCRIPT KILL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT LOAD": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the SHA1 digest of the script added into the script cache." - ], - "SDIFF": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list with members of the resulting set." - ], - "SDIFFSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set." - ], - "SELECT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SET": [ - "Any of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options).", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The key didn't exist before the `SET`.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key." - ], - "SETBIT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the original bit value stored at _offset_." - ], - "SETEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the key was not set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the key was set." - ], - "SETRANGE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after it was modified by the command." - ], - "SHUTDOWN": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if _ABORT_ was specified and shutdown was aborted. On successful shutdown, nothing is returned because the server quits and the connection is closed. On failure, an error is returned." - ], - "SINTER": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array with the members of the resulting set." - ], - "SINTERCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting intersection." - ], - "SINTERSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set." - ], - "SISMEMBER": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of the set, or when the key does not exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is a member of the set." - ], - "SLAVEOF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SLOWLOG": [], - "SLOWLOG GET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of slow log entries per the above format." - ], - "SLOWLOG HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "SLOWLOG LEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries in the slow log." - ], - "SLOWLOG RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SMEMBERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array with all the members of the set." - ], - "SMISMEMBER": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list representing the membership of the given elements, in the same order as they are requested." - ], - "SMOVE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is moved.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of _source_ and no operation was performed." - ], - "SORT": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): without passing the _STORE_ option, the command returns a list of sorted elements.", - "[Integer reply](../../develop/reference/protocol-spec#integers): when the _STORE_ option is specified, the command returns the number of sorted elements in the destination list." - ], - "SORT_RO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sorted elements." - ], - "SPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the removed member.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of the removed members." - ], - "SPUBLISH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count" - ], - "SRANDMEMBER": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or a [Nil reply](../../develop/reference/protocol-spec#bulk-strings) when _key_ doesn't exist.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the optional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist." - ], - "SREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members that were removed from the set, not including non existing members." - ], - "SSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements:", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned members." - ], - "SSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `ssubscribe` is pushed as a confirmation that the command succeeded. Note that this command can also return a -MOVED redirect." - ], - "STRLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string stored at key, or 0 when the key does not exist." - ], - "SUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `subscribe` is pushed as a confirmation that the command succeeded." - ], - "SUBSTR": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." - ], - "SUNION": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list with members of the resulting set." - ], - "SUNIONSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set." - ], - "SUNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `sunsubscribe` is pushed as a confirmation that the command succeeded." - ], - "SWAPDB": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SYNC": [ - "**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master." - ], - "TIME": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count." - ], - "TOUCH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of touched keys." - ], - "TTL": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in seconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "TYPE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): the type of _key_, or `none` when _key_ doesn't exist." - ], - "UNLINK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were unlinked." - ], - "UNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `unsubscribe` is pushed as a confirmation that the command succeeded." - ], - "UNWATCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "VADD": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): 1 if key was added; 0 if key was not added.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed." - ], - "VCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set." - ], - "VDIM": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist." - ], - "VEMB": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): of real numbers as [bulk strings](../../develop/reference/protocol-spec#bulk-strings), representing the vector.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements:", - " 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`.", - " 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data:", - " * 4-byte floats for fp32", - " * A bitmap for binary quantization", - " * A byte array for q8", - " 1. The L2 norm, as a [simple string](../../develop/reference/protocol-spec#simple-strings), of the vector before normalization.", - " 1. (Only for q8): The quantization range as a [simple string](../../develop/reference/protocol-spec#simple-strings). Multiply this by integer components to recover normalized values." - ], - "VGETATTR": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s).", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown key or element, or when no attributes exist for the given key/element pair." - ], - "VINFO": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) (null array reply) for unknown key." - ], - "VLINKS": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings); interleved with scores when using the WITHSCORES option.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys and/or elements." - ], - "VRANDMEMBER": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of count random elements as [strings](../../develop/reference/protocol-spec#simple-strings).", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified." - ], - "VREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if either element or key do not exist; 1 if the element was removed." - ], - "VSETATTR": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): 0 if either the key or element does not exist; 1 if the attributes were successfully added to the element.", - "* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string." - ], - "VSIM": [ - "One of the following:", - "* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for unknown element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements; juxtaposed with scores when used with the WITHSCORES option." - ], - "WAIT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the command returns the number of replicas reached by all the writes performed in the context of the current connection." - ], - "WAITAOF": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): The command returns an array of two integers:", - "1. The first is the number of local Redises (0 or 1) that have fsynced to AOF all writes performed in the context of the current connection", - "2. The second is the number of replicas that have acknowledged doing the same." - ], - "WATCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XACK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged." - ], - "XADD": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The ID of the added entry. The ID is the one automatically generated if an asterisk (`*`) is passed as the _id_ argument, otherwise the command just returns the same ID specified by the user during insertion.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the NOMKSTREAM option is given and the key doesn't exist." - ], - "XAUTOCLAIM": [ - "[Array reply](../../develop/reference/protocol-spec#arrays), specifically, an array with three elements:", - "1. A stream ID to be used as the _start_ argument for the next call to XAUTOCLAIM.", - "2. An [Array reply](../../develop/reference/protocol-spec#arrays) containing all the successfully claimed messages in the same format as `XRANGE`.", - "3. An [Array reply](../../develop/reference/protocol-spec#arrays) containing message IDs that no longer exist in the stream, and were deleted from the PEL in which they were found." - ], - "XCLAIM": [ - "Any of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the _JUSTID_ option is specified, an array of IDs of messages successfully claimed.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of stream entries, each of which contains an array of two elements, the entry ID and the entry data itself." - ], - "XDEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries that were deleted." - ], - "XGROUP": [], - "XGROUP CREATE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XGROUP CREATECONSUMER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of created consumers, either 0 or 1." - ], - "XGROUP DELCONSUMER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted." - ], - "XGROUP DESTROY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of destroyed consumer groups, either 0 or 1." - ], - "XGROUP HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "XGROUP SETID": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XINFO": [], - "XINFO CONSUMERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes." - ], - "XINFO GROUPS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumer groups." - ], - "XINFO HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "XINFO STREAM": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the _FULL_ argument is used, a list of information about a stream in summary form.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the _FULL_ argument is used, a list of information about a stream in extended form." - ], - "XLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries of the stream at _key_." - ], - "XPENDING": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): different data depending on the way XPENDING is called, as explained on this page." - ], - "XRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of stream entries with IDs matching the specified range." - ], - "XREAD": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is an array composed of a two elements containing the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served." - ], - "XREADGROUP": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is an array composed of a two elements containing the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served." - ], - "XREVRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): The command returns the entries with IDs matching the specified range. The returned entries are complete, which means that the ID and all the fields they are composed of are returned. Moreover, the entries are returned with their fields and values in the same order as `XADD` added them." - ], - "XSETID": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XTRIM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of entries deleted from the stream." - ], - "ZADD": [ - "Any of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the operation was aborted because of a conflict with one of the _XX/NX/LT/GT_ options.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new members when the _CH_ option is not used.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new or updated members when the _CH_ option is used.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the updated score of the member when the _INCR_ option is used." - ], - "ZCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of members) of the sorted set, or 0 if the key doesn't exist." - ], - "ZCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range." - ], - "ZDIFF": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the difference including, optionally, scores when the _WITHSCORES_ option is used." - ], - "ZDIFFSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at _destination_." - ], - "ZINCRBY": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the new score of _member_ as a double precision floating point number." - ], - "ZINTER": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the intersection including, optionally, scores when the _WITHSCORES_ option is used." - ], - "ZINTERCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting intersection." - ], - "ZINTERSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at the _destination_." - ], - "ZLEXCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range." - ], - "ZMPOP": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): when no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): A two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score." - ], - "ZMSCORE": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the member does not exist in the sorted set.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) _member_ scores as double-precision floating point numbers." - ], - "ZPOPMAX": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores." - ], - "ZPOPMIN": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores." - ], - "ZRANDMEMBER": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or [Nil reply](../../develop/reference/protocol-spec#bulk-strings) when _key_ doesn't exist.", - "[Array reply](../../develop/reference/protocol-spec#arrays): when the additional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. If the _WITHSCORES_ modifier is used, the reply is a list of members and their scores from the sorted set." - ], - "ZRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range with, optionally, their scores when the _WITHSCORES_ option is given." - ], - "ZRANGEBYLEX": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified score range." - ], - "ZRANGEBYSCORE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members with, optionally, their scores in the specified score range." - ], - "ZRANGESTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set." - ], - "ZRANK": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or the member does not exist in the sorted set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the rank of the member when _WITHSCORE_ is not used.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the rank and score of the member when _WITHSCORE_ is used." - ], - "ZREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed from the sorted set, not including non-existing members." - ], - "ZREMRANGEBYLEX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed." - ], - "ZREMRANGEBYRANK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed." - ], - "ZREMRANGEBYSCORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed." - ], - "ZREVRANGE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range, optionally with their scores if _WITHSCORE_ was used." - ], - "ZREVRANGEBYLEX": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified score range." - ], - "ZREVRANGEBYSCORE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members and, optionally, their scores in the specified score range." - ], - "ZREVRANK": [ - "One of the following:", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if the key does not exist or the member does not exist in the sorted set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): The rank of the member when _WITHSCORE_ is not used.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): The rank and score of the member when _WITHSCORE_ is used." - ], - "ZSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form." - ], - "ZSCORE": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the score of the member (a double-precision floating point number), represented as a string.", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _member_ does not exist in the sorted set, or the key does not exist." - ], - "ZUNION": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the result of the union with, optionally, their scores when _WITHSCORES_ is used." - ], - "ZUNIONSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set." - ] -} diff --git a/data/resp3_replies.json b/data/resp3_replies.json deleted file mode 100644 index 4fcd08a4c..000000000 --- a/data/resp3_replies.json +++ /dev/null @@ -1,1532 +0,0 @@ -{ - "ACL": [], - "ACL CAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given." - ], - "ACL DELUSER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist." - ], - "ACL DRYRUN": [ - "Any of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command." - ], - "ACL GENPASS": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4." - ], - "ACL GETUSER": [ - "One of the following:", - "* [Map reply](../../develop/reference/protocol-spec#maps): a set of ACL rule definitions for the user", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if user does not exist." - ], - "ACL HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "ACL LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements." - ], - "ACL LOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "", - "The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.", - "Finally, the command will fail if the server is not configured to use an external ACL file." - ], - "ACL LOG": [ - "When called to show security events:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.", - "When called with `RESET`:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared." - ], - "ACL SAVE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.", - "The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file." - ], - "ACL SETUSER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.", - "If the rules contain errors, the error is returned." - ], - "ACL USERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users." - ], - "ACL WHOAMI": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection." - ], - "APPEND": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation." - ], - "ASKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "AUTH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid." - ], - "BGREWRITEAOF": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.", - "", - "The command may reply with an error in certain cases, as documented above." - ], - "BGSAVE": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`." - ], - "BITCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1." - ], - "BITFIELD": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if OVERFLOW FAIL was given and overflows or underflows are detected." - ], - "BITFIELD_RO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position." - ], - "BITOP": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the size of the string stored in the destination key is equal to the size of the longest input string." - ], - "BITPOS": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the position of the first bit set to 1 or 0 according to the request", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1`. In case the `bit` argument is 1 and the string is empty or composed of just zero bytes", - "", - "If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned.", - "", - "If we look for clear bits (the bit argument is 0) and the string only contains bits set to 1, the function returns the first bit not part of the string on the right. So if the string is three bytes set to the value `0xff` the command `BITPOS key 0` will return 24, since up to bit 23 all the bits are 1.", - "", - "The function considers the right of the string as padded with zeros if you look for clear bits and specify no range or the _start_ argument **only**.", - "", - "However, this behavior changes if you are looking for clear bits and specify a range with both _start_ and _end_.", - "If a clear bit isn't found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range." - ], - "BLMOVE": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from the _source_ and pushed to the _destination_.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): the operation timed-out" - ], - "BLMPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ is reached.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element being an array of the popped elements." - ], - "BLPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): no element could be popped and the timeout expired", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element." - ], - "BRPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): no element could be popped and the timeout expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the key from which the element was popped and the value of the popped element" - ], - "BRPOPLPUSH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped from _source_ and pushed to _destination_.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): the timeout is reached." - ], - "BZMPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score." - ], - "BZPOPMAX": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score." - ], - "BZPOPMIN": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped and the _timeout_ expired.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the keyname, popped member, and its score." - ], - "CLIENT": [], - "CLIENT CACHING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the argument is not \"yes\" or \"no\"." - ], - "CLIENT GETNAME": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the connection name of the current connection.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): the connection name was not set." - ], - "CLIENT GETREDIR": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected." - ], - "CLIENT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "CLIENT ID": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client." - ], - "CLIENT INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a unique string for the current client, as described at the `CLIENT LIST` page." - ], - "CLIENT KILL": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called in 3 argument format and the connection has been closed.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): when called in filter/value format, the number of clients killed." - ], - "CLIENT LIST": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): information and statistics about client connections." - ], - "CLIENT NO-EVICT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLIENT NO-TOUCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLIENT PAUSE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` or an error if the timeout is invalid." - ], - "CLIENT REPLY": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when called with `ON`. When called with either `OFF` or `SKIP` sub-commands, no reply is made." - ], - "CLIENT SETINFO": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the attribute name was successfully set." - ], - "CLIENT SETNAME": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection name was successfully set." - ], - "CLIENT TRACKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the connection was successfully put in tracking mode or if the tracking mode was successfully disabled. Otherwise, an error is returned." - ], - "CLIENT TRACKINGINFO": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a list of tracking information sections and their respective values." - ], - "CLIENT UNBLOCK": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the client was unblocked successfully.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the client wasn't unblocked." - ], - "CLIENT UNPAUSE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLUSTER": [], - "CLUSTER ADDSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER ADDSLOTSRANGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER BUMPEPOCH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `BUMPED` if the epoch was incremented.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `STILL` if the node already has the greatest configured epoch in the cluster." - ], - "CLUSTER COUNT-FAILURE-REPORTS": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of active failure reports for the node." - ], - "CLUSTER COUNTKEYSINSLOT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of keys in the specified hash slot, or an error if the hash slot is invalid." - ], - "CLUSTER DELSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER DELSLOTSRANGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER FAILOVER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a manual failover is going to be attempted. An error if the operation cannot be executed, for example if the client is connected to a node that is already a master." - ], - "CLUSTER FLUSHSLOTS": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CLUSTER FORGET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was executed successfully. Otherwise an error is returned." - ], - "CLUSTER GETKEYSINSLOT": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array with up to count elements." - ], - "CLUSTER HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions." - ], - "CLUSTER INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): A map between named fields and values in the form of : lines separated by newlines composed by the two bytes CRLF" - ], - "CLUSTER KEYSLOT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The hash slot number for the specified key" - ], - "CLUSTER LINKS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Map reply](../../develop/reference/protocol-spec#maps) where each map contains various attributes and their values of a cluster link." - ], - "CLUSTER MEET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned." - ], - "CLUSTER MYID": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node ID." - ], - "CLUSTER MYSHARDID": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the node's shard ID." - ], - "CLUSTER NODES": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized cluster configuration." - ], - "CLUSTER REPLICAS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`." - ], - "CLUSTER REPLICATE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SAVECONFIG": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SET-CONFIG-EPOCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SETSLOT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): all the sub-commands return `OK` if the command was successful. Otherwise an error is returned." - ], - "CLUSTER SHARDS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of [Map reply](../../develop/reference/protocol-spec#maps) of hash ranges and shard nodes describing individual shards." - ], - "CLUSTER SLAVES": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of replica nodes replicating from the specified master node provided in the same format used by `CLUSTER NODES`." - ], - "CLUSTER SLOTS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): nested list of slot ranges with networking information." - ], - "COMMAND": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details. The order of the commands in the array is random." - ], - "COMMAND COUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of commands returned by `COMMAND`." - ], - "COMMAND DOCS": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a map where each key is a command name, and each value is the documentary information." - ], - "COMMAND GETKEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command." - ], - "COMMAND GETKEYSANDFLAGS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys from the given command and their usage flags." - ], - "COMMAND HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "COMMAND INFO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a nested list of command details." - ], - "COMMAND LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of command names." - ], - "CONFIG": [], - "CONFIG GET": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a list of configuration parameters matching the provided arguments." - ], - "CONFIG HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "CONFIG RESETSTAT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "CONFIG REWRITE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was rewritten properly. Otherwise an error is returned." - ], - "CONFIG SET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned." - ], - "COPY": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _source_ was copied.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _source_ was not copied." - ], - "DBSIZE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys in the currently-selected database." - ], - "DEBUG": [], - "DECR": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it." - ], - "DECRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after decrementing it." - ], - "DEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were removed." - ], - "DISCARD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "DUMP": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized value of the key.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): the key does not exist." - ], - "ECHO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the given string." - ], - "EVAL": [ - "The return value depends on the script that was executed." - ], - "EVALSHA": [ - "The return value depends on the script that was executed." - ], - "EVALSHA_RO": [ - "The return value depends on the script that was executed." - ], - "EVAL_RO": [ - "The return value depends on the script that was executed." - ], - "EXEC": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): each element being the reply to each of the commands in the atomic transaction.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): the transaction was aborted because a `WATCH`ed key was touched." - ], - "EXISTS": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that exist from those specified as arguments." - ], - "EXPIRE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "EXPIREAT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set; for example, the key doesn't exist, or the operation was skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "EXPIRETIME": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the expiration Unix timestamp in seconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "FAILOVER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the command was accepted and a coordinated failover is in progress. An error if the operation cannot be executed." - ], - "FCALL": [ - "The return value depends on the function that was executed." - ], - "FCALL_RO": [ - "The return value depends on the function that was executed." - ], - "FLUSHALL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FLUSHDB": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION": [], - "FUNCTION DELETE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION DUMP": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the serialized payload" - ], - "FUNCTION FLUSH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "FUNCTION KILL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): information about functions and libraries." - ], - "FUNCTION LOAD": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the library name that was loaded." - ], - "FUNCTION RESTORE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "FUNCTION STATS": [ - "[Map reply](../../develop/reference/protocol-spec#maps): information about the function that's currently running and information about the available execution engines." - ], - "GEOADD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated)." - ], - "GEODIST": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): one or both of the elements are missing.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): distance as a double (represented as a string) in the specified units." - ], - "GEOHASH": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is the Geohash corresponding to each member name passed as an argument to the command." - ], - "GEOPOS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as [Null reply](../../develop/reference/protocol-spec#nulls) elements of the array." - ], - "GEORADIUS": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " 1. The distance from the center as a floating point number, in the same unit specified in the radius.", - " 1. The Geohash integer.", - " 1. The coordinates as a two items x,y array (longitude,latitude).", - "", - "For example, the command `GEORADIUS Sicily 15 37 200 km WITHCOORD WITHDIST` will return each item in the following way:", - "", - "`[\"Palermo\",\"190.4424\",[\"13.361389338970184\",\"38.115556395496299\"]]`" - ], - "GEORADIUSBYMEMBER": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEORADIUSBYMEMBER_RO": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEORADIUS_RO": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEOSEARCH": [ - "One of the following:", - "* If no `WITH*` option is specified, an [Array reply](../../develop/reference/protocol-spec#arrays) of matched member names", - "* If `WITHCOORD`, `WITHDIST`, or `WITHHASH` options are specified, the command returns an [Array reply](../../develop/reference/protocol-spec#arrays) of arrays, where each sub-array represents a single item:", - " * The distance from the center as a floating point number, in the same unit specified in the radius.", - " * The Geohash integer.", - " * The coordinates as a two items x,y array (longitude,latitude)." - ], - "GEOSEARCHSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set" - ], - "GET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): key does not exist." - ], - "GETBIT": [ - "The bit value stored at _offset_, one of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0`.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1`." - ], - "GETDEL": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or if the key's value type is not a string." - ], - "GETEX": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of `key`", - "[Null reply](../../develop/reference/protocol-spec#nulls): if `key` does not exist." - ], - "GETRANGE": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." - ], - "GETSET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the old value stored at the key.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist." - ], - "HDEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of fields that were removed from the hash, excluding any specified but non-existing fields." - ], - "HELLO": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties.", - "[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist." - ], - "HEXISTS": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the hash does not contain the field, or the key does not exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the hash contains the field." - ], - "HEXPIRE": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX | XX | GT | LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE`/`HPEXPIRE` is called with 0 seconds/milliseconds or when `HEXPIREAT`/`HPEXPIREAT` is called with a past Unix time in seconds/milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HEXPIREAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HEXPIRETIME": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in seconds." - ], - "HGET": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value associated with the field.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): If the field is not present in the hash or key does not exist." - ], - "HGETALL": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a map of fields and their values, or an empty list when key does not exist." - ], - "HGETDEL": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." - ], - "HGETEX": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested." - ], - "HINCRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation." - ], - "HINCRBYFLOAT": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The value of the field after the increment operation." - ], - "HKEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields in the hash, or an empty list when the key does not exist." - ], - "HLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of the fields in the hash, or 0 when the key does not exist." - ], - "HMGET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values associated with the given fields, in the same order as they are requested." - ], - "HMSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "HPERSIST": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` the expiration was removed." - ], - "HPEXPIRE": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HPEXPIREAT": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the specified NX, XX, GT, or LT condition has not been met.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the expiration time was set/updated.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `2` when `HEXPIRE` or `HPEXPIRE` is called with 0 seconds or milliseconds, or when `HEXPIREAT` or `HPEXPIREAT` is called with a past Unix time in seconds or milliseconds.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors):", - " - if parsing failed, mandatory arguments are missing, unknown arguments are specified, or argument values are of the wrong type or out of range.", - " - if the provided key exists but is not a hash." - ], - "HPEXPIRETIME": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration (Unix timestamp) in milliseconds." - ], - "HPTTL": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in milliseconds." - ], - "HRANDFIELD": [ - "Any of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key doesn't exist", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a single, randomly selected field when the `count` option is not used", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list containing `count` fields when the `count` option is used, or an empty array if the key does not exists.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values when `count` and `WITHVALUES` were both used." - ], - "HSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a two-element array.", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) of field/value pairs that were scanned. When the `NOVALUES` flag (since Redis 7.4) is used, only the field names are returned." - ], - "HSET": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added." - ], - "HSETEX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset." - ], - "HSETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the field is a new field in the hash and the value was set." - ], - "HTTL": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the field exists but has no associated expiration set.", - " - [Integer reply](../../develop/reference/protocol-spec#integers): the TTL in seconds." - ], - "HSTRLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the string length of the value associated with the _field_, or zero when the _field_ isn't present in the hash or the _key_ doesn't exist at all." - ], - "HVALS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values in the hash, or an empty list when the key does not exist." - ], - "INCR": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment." - ], - "INCRBY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the key after the increment." - ], - "INCRBYFLOAT": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the value of the key after the increment." - ], - "INFO": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a map of info fields, one field per line in the form of `:` where the value can be a comma separated map like `=`. Also contains section header lines starting with `#` and blank lines.", - "", - "Lines can contain a section name (starting with a `#` character) or a property. All the properties are in the form of `field:value` terminated by `\\r\\n`." - ], - "KEYS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of keys matching _pattern_." - ], - "LASTSAVE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): UNIX TIME of the last DB save executed with success." - ], - "LATENCY": [], - "LATENCY DOCTOR": [ - "[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a human readable latency analysis report." - ], - "LATENCY GRAPH": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Latency graph" - ], - "LATENCY HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "LATENCY HISTOGRAM": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets." - ], - "LATENCY HISTORY": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a two elements array representing the timestamp and the latency of the event." - ], - "LATENCY LATEST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements." - ], - "LATENCY RESET": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of event time series that were reset." - ], - "LCS": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the longest common subsequence.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the length of the longest common subsequence when _LEN_ is given.", - "* [Map reply](../../develop/reference/protocol-spec#maps): a map with the LCS length and all the ranges in both the strings when _IDX_ is given." - ], - "LINDEX": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when _index_ is out of range.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the requested element." - ], - "LINSERT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the list length after a successful insert operation.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when the key doesn't exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` when the pivot wasn't found." - ], - "LLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list." - ], - "LMOVE": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed." - ], - "LMPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array with the first element being the name of the key from which elements were popped and the second element being an array of elements." - ], - "LOLWUT": [ - "[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a string containing generative computer art and the Redis version." - ], - "LPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the first element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements." - ], - "LPOS": [ - "Any of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if there is no matching element.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): an integer representing the matching element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): If the COUNT option is given, an array of integers representing the matching elements (or an empty array if there are no matches)." - ], - "LPUSH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "LPUSHX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "LRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified range, or an empty array if the key doesn't exist." - ], - "LREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of removed elements." - ], - "LSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "LTRIM": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "MEMORY": [], - "MEMORY DOCTOR": [ - "[Verbatim string reply](../../develop/reference/protocol-spec#verbatim-strings): a memory problems report." - ], - "MEMORY HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "MEMORY MALLOC-STATS": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The memory allocator's internal statistics report." - ], - "MEMORY PURGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "MEMORY STATS": [ - "[Map reply](../../develop/reference/protocol-spec#maps): memory usage metrics and their values." - ], - "MEMORY USAGE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the memory usage in bytes.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist." - ], - "MGET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of values at the specified keys." - ], - "MIGRATE": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `NOKEY` when no keys were found in the source instance." - ], - "MODULE": [], - "MODULE HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions" - ], - "MODULE LIST": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): list of loaded modules. Each element in the list represents a represents a module, and is a [Map reply](../../develop/reference/protocol-spec#maps) of property names and their values. The following properties is reported for each loaded module:", - "* name: the name of the module.", - "* ver: the version of the module." - ], - "MODULE LOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded." - ], - "MODULE LOADEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was loaded." - ], - "MODULE UNLOAD": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the module was unloaded." - ], - "MONITOR": [ - "**Non-standard return value**. Dumps the received commands in an infinite flow." - ], - "MOVE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was moved.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ wasn't moved." - ], - "MSET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): always `OK` because `MSET` can't fail." - ], - "MSETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no key was set (at least one key already existed).", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the keys were set." - ], - "MULTI": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "OBJECT": [], - "OBJECT ENCODING": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key doesn't exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the encoding of the object." - ], - "OBJECT FREQ": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the counter's value.", - "[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist." - ], - "OBJECT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "OBJECT IDLETIME": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the idle time in seconds.", - "[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist." - ], - "OBJECT REFCOUNT": [ - "One of the following:", - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of references.", - "[Null reply](../../develop/reference/protocol-spec#nulls): if _key_ doesn't exist." - ], - "PERSIST": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _key_ does not exist or does not have an associated timeout.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout has been removed." - ], - "PEXPIRE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0`if the timeout was not set. For example, if the key doesn't exist, or the operation skipped because of the provided arguments.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set." - ], - "PEXPIREAT": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the timeout was set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the timeout was not set. For example, if the key doesn't exist, or the operation was skipped due to the provided arguments." - ], - "PEXPIRETIME": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): Expiration Unix timestamp in milliseconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration time.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "PFADD": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if at least one HyperLogLog internal register was altered.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no HyperLogLog internal registers were altered." - ], - "PFCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the approximated number of unique elements observed via `PFADD`" - ], - "PFDEBUG": [], - "PFMERGE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PFSELFTEST": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PING": [ - "Any of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `PONG` when no argument is provided.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the provided argument." - ], - "PSETEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "PSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `psubscribe` is pushed as a confirmation that the command succeeded." - ], - "PSYNC": [ - "**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master." - ], - "PTTL": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in milliseconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "PUBLISH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count." - ], - "PUBSUB": [], - "PUBSUB CHANNELS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern." - ], - "PUBSUB HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "PUBSUB NUMPAT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of patterns all the clients are subscribed to." - ], - "PUBSUB NUMSUB": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers" - ], - "PUBSUB SHARDCHANNELS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of active channels, optionally matching the specified pattern." - ], - "PUBSUB SHARDNUMSUB": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the number of subscribers per shard channel, each even element (including the 0th) is channel name, each odd element is the number of subscribers." - ], - "PUNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each pattern, one message with the first element being the string `punsubscribe` is pushed as a confirmation that the command succeeded." - ], - "QUIT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RANDOMKEY": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when the database is empty.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a random key in the database." - ], - "READONLY": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "READWRITE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RENAME": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RENAMENX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if _key_ was renamed to _newkey_.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if _newkey_ already exists." - ], - "REPLCONF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "REPLICAOF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `RESET`." - ], - "RESTORE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "RESTORE-ASKING": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "ROLE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): where the first element is one of `master`, `slave`, or `sentinel`, and the additional elements are role-specific as illustrated above." - ], - "RPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the value of the last element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of popped elements." - ], - "RPOPLPUSH": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the element being popped and pushed.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the source list is empty." - ], - "RPUSH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "RPUSHX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation." - ], - "SADD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements that were added to the set, not including all the elements already present in the set." - ], - "SAVE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements.", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned keys." - ], - "SCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The cardinality (number of elements) of the set, or 0 if the key does not exist." - ], - "SCRIPT": [], - "SCRIPT DEBUG": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT EXISTS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): an array of integers that correspond to the specified SHA1 digest arguments." - ], - "SCRIPT FLUSH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "SCRIPT KILL": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SCRIPT LOAD": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the SHA1 digest of the script added into the script cache." - ], - "SDIFF": [ - "[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set." - ], - "SDIFFSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting set." - ], - "SELECT": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SENTINEL CKQUORUM": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Returns OK if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover." - ], - "SENTINEL CONFIG": [ - "One of the following:", - "* [Map reply](../../develop/reference/protocol-spec#maps): When 'SENTINEL-CONFIG GET' is called, returns a map.", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. When 'SENTINEL-CONFIG SET' is called, returns OK on success." - ], - "SENTINEL DEBUG": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. The configuration update was successful.", - "* [Map reply](../../develop/reference/protocol-spec#maps): List of configurable time parameters and their values (milliseconds)." - ], - "SENTINEL FAILOVER": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. Force a fail over as if the master was not reachable, and without asking for agreement to other Sentinels." - ], - "SENTINEL FLUSHCONFIG": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. Force Sentinel to rewrite its configuration on disk, including the current Sentinel state." - ], - "SENTINEL GET MASTER-ADDR-BY-NAME": [], - "SENTINEL HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): Helpful text about subcommands." - ], - "SENTINEL INFO CACHE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): This is actually a map, the odd entries are a master name, and the even entries are the last cached INFO output from that master and all its replicas." - ], - "SENTINEL IS MASTER-DOWN-BY-ADDR": [], - "SENTINEL MASTER": [ - "[Map reply](../../develop/reference/protocol-spec#maps): The state and info of the specified master." - ], - "SENTINEL MASTERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of monitored Redis masters, and their state." - ], - "SENTINEL MONITOR": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SENTINEL MYID": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): Node ID of the sentinel instance." - ], - "SENTINEL PENDING SCRIPTS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of pending scripts." - ], - "SENTINEL REMOVE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SENTINEL REPLICAS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of replicas for this master, and their state." - ], - "SENTINEL RESET": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of masters that were reset." - ], - "SENTINEL SENTINELS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of sentinel instances, and their state." - ], - "SENTINEL SET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SENTINEL SIMULATE FAILURE": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. The simulated flag was set.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): Supported simulates flags. Returned in case `HELP` was used." - ], - "SENTINEL SLAVES": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of monitored replicas, and their state." - ], - "SET": [ - "Any of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options).", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` given: The key didn't exist before the `SET`.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key." - ], - "SETBIT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the original bit value stored at _offset_." - ], - "SETEX": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SETNX": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the key was not set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the key was set." - ], - "SETRANGE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after it was modified by the command." - ], - "SHUTDOWN": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if _ABORT_ was specified and shutdown was aborted. On successful shutdown, nothing is returned because the server quits and the connection is closed. On failure, an error is returned." - ], - "SINTER": [ - "[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set." - ], - "SINTERCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting intersection." - ], - "SINTERSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the result set." - ], - "SISMEMBER": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of the set, or when the key does not exist.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is a member of the set." - ], - "SLAVEOF": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SLOWLOG": [], - "SLOWLOG GET": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of slow log entries per the above format." - ], - "SLOWLOG HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "SLOWLOG LEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries in the slow log." - ], - "SLOWLOG RESET": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SMEMBERS": [ - "[Set reply](../../develop/reference/protocol-spec#sets): a set with all the members of the set." - ], - "SMISMEMBER": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list representing the membership of the given elements, in the same order as they are requested." - ], - "SMOVE": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if the element is moved.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the element is not a member of _source_ and no operation was performed." - ], - "SORT": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): without passing the _STORE_ option, the command returns a list of sorted elements.", - "[Integer reply](../../develop/reference/protocol-spec#integers): when the _STORE_ option is specified, the command returns the number of sorted elements in the destination list." - ], - "SORT_RO": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sorted elements." - ], - "SPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist.", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): when called without the _count_ argument, the removed member.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when called with the _count_ argument, a list of the removed members." - ], - "SPUBLISH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of clients that the message was sent to. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count" - ], - "SRANDMEMBER": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or a [Null reply](../../develop/reference/protocol-spec#nulls) when _key_ doesn't exist.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the optional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist." - ], - "SREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): Number of members that were removed from the set, not including non existing members." - ], - "SSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, an array with two elements:", - "* The first element is a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) that represents an unsigned 64-bit number, the cursor.", - "* The second element is an [Array reply](../../develop/reference/protocol-spec#arrays) with the names of scanned members." - ], - "SSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string 'ssubscribe' is pushed as a confirmation that the command succeeded. Note that this command can also return a -MOVED redirect." - ], - "STRLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string stored at key, or 0 when the key does not exist." - ], - "SUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `subscribe` is pushed as a confirmation that the command succeeded." - ], - "SUBSTR": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." - ], - "SUNION": [ - "[Set reply](../../develop/reference/protocol-spec#sets): a set with the members of the resulting set." - ], - "SUNIONSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): Number of the elements in the resulting set." - ], - "SUNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each shard channel, one message with the first element being the string `sunsubscribe` is pushed as a confirmation that the command succeeded." - ], - "SWAPDB": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "SYNC": [ - "**Non-standard return value**, a bulk transfer of the data followed by `PING` and write requests from the master." - ], - "TIME": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count." - ], - "TOUCH": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of touched keys." - ], - "TTL": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): TTL in seconds.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if the key exists but has no associated expiration.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if the key does not exist." - ], - "TYPE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): the type of _key_, or `none` when _key_ doesn't exist." - ], - "UNLINK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of keys that were unlinked." - ], - "UNSUBSCRIBE": [ - "When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string `unsubscribe` is pushed as a confirmation that the command succeeded." - ], - "UNWATCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "VADD": [ - "One of the following:", - "* [Boolean reply](../../develop/reference/protocol-spec#booleans): true if key was added; false if key was not added.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed." - ], - "VCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set." - ], - "VDIM": [ - "One of the following:", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements.", - "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist." - ], - "VEMB": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): of [doubles](../../develop/reference/protocol-spec#doubles), representing the vector.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements:", - " 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`.", - " 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data:", - " * 4-byte floats for fp32", - " * A bitmap for binary quantization", - " * A byte array for q8", - " 1. The [double](../../develop/reference/protocol-spec#doubles) L2 norm of the vector before normalization.", - " 1. (Only for q8): The quantization range as a [double](../../develop/reference/protocol-spec#doubles). Multiply this by integer components to recover normalized values." - ], - "VGETATTR": [ - "One of the following:", - "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s).", - "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key or element, or when no attributes exist for the given key/element pair." - ], - "VINFO": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure.", - "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key." - ], - "VLINKS": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings) when used without the WITHSCORES option.", - "* [Map reply](../../develop/reference/protocol-spec#maps) containing the names of adjecent elements as [strings](../../develop/reference/protocol-spec#simple-strings), together with their scores as [doubles](../../develop/reference/protocol-spec#doubles) when used with the WITHSCORES option.", - "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys and/or elements." - ], - "VRANDMEMBER": [ - "One of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of *count* random elements as [strings](../../develop/reference/protocol-spec#simple-strings).", - "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified." - ], - "VREM": [ - "[Boolean reply](../../develop/reference/protocol-spec#booleans): false if either element or key do not exist; true if the element was removed." - ], - "VSETATTR": [ - "One of the following:", - "* [Boolean reply](../../develop/reference/protocol-spec#booleans): false if either the key or element does not exist; true if the attributes were successfully added to the element.", - "* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string." - ], - "VSIM": [ - "One of the following:", - "* [Simple error reply](../../develop/reference/protocol-spec/#simple-errors) for unknown element.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key.", - "* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements.", - "* [Map reply](../../develop/reference/protocol-spec#maps) with matching elements and [double](../../develop/reference/protocol-spec#doubles) scores when used with the WITHSCORES option." - ], - "WAIT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of replicas reached by all the writes performed in the context of the current connection." - ], - "WAITAOF": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): The command returns an array of two integers:", - "1. The first is the number of local Redises (0 or 1) that have fsynced to AOF all writes performed in the context of the current connection", - "2. The second is the number of replicas that have acknowledged doing the same." - ], - "WATCH": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XACK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged." - ], - "XADD": [ - "One of the following:", - "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The ID of the added entry. The ID is the one automatically generated if an asterisk (`*`) is passed as the _id_ argument, otherwise the command just returns the same ID specified by the user during insertion.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the NOMKSTREAM option is given and the key doesn't exist." - ], - "XAUTOCLAIM": [ - "[Array reply](../../develop/reference/protocol-spec#arrays), specifically, an array with three elements:", - "1. A stream ID to be used as the _start_ argument for the next call to XAUTOCLAIM.", - "2. An [Array reply](../../develop/reference/protocol-spec#arrays) containing all the successfully claimed messages in the same format as `XRANGE`.", - "3. An [Array reply](../../develop/reference/protocol-spec#arrays) containing message IDs that no longer exist in the stream, and were deleted from the PEL in which they were found." - ], - "XCLAIM": [ - "Any of the following:", - "* [Array reply](../../develop/reference/protocol-spec#arrays): when the _JUSTID_ option is specified, an array of IDs of messages successfully claimed.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): an array of stream entries, each of which contains an array of two elements, the entry ID and the entry data itself." - ], - "XDEL": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries that were deleted." - ], - "XGROUP": [], - "XGROUP CREATE": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XGROUP CREATECONSUMER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of created consumers, either 0 or 1." - ], - "XGROUP DELCONSUMER": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted." - ], - "XGROUP DESTROY": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of destroyed consumer groups, either 0 or 1." - ], - "XGROUP HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "XGROUP SETID": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XINFO": [], - "XINFO CONSUMERS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes." - ], - "XINFO GROUPS": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumer groups." - ], - "XINFO HELP": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of sub-commands and their descriptions." - ], - "XINFO STREAM": [ - "One of the following:", - "* [Map reply](../../develop/reference/protocol-spec#maps): when the _FULL_ argument was not given, a list of information about a stream in summary form.", - "* [Map reply](../../develop/reference/protocol-spec#maps): when the _FULL_ argument was given, a list of information about a stream in extended form." - ], - "XLEN": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of entries of the stream at _key_." - ], - "XPENDING": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): different data depending on the way XPENDING is called, as explained on this page." - ], - "XRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of stream entries with IDs matching the specified range." - ], - "XREAD": [ - "One of the following:", - "* [Map reply](../../develop/reference/protocol-spec#maps): A map of key-value elements where each element is composed of the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served." - ], - "XREADGROUP": [ - "One of the following:", - "* [Map reply](../../develop/reference/protocol-spec#maps): A map of key-value elements where each element is composed of the key name and the entries reported for that key. The entries reported are full stream entries, having IDs and the list of all the fields and values. Field and values are guaranteed to be reported in the same order they were added by `XADD`.", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the _BLOCK_ option is given and a timeout occurs, or if there is no stream that can be served." - ], - "XREVRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): The command returns the entries with IDs matching the specified range. The returned entries are complete, which means that the ID and all the fields they are composed of are returned. Moreover, the entries are returned with their fields and values in the same order as `XADD` added them." - ], - "XSETID": [ - "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." - ], - "XTRIM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): The number of entries deleted from the stream." - ], - "ZADD": [ - "Any of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the operation was aborted because of a conflict with one of the _XX/NX/LT/GT_ options.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new members when the _CH_ option is not used.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of new or updated members when the _CH_ option is used.", - "* [Double reply](../../develop/reference/protocol-spec#doubles): the updated score of the member when the _INCR_ option is used." - ], - "ZCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the cardinality (number of members) of the sorted set, or 0 if the key doesn't exist." - ], - "ZCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range." - ], - "ZDIFF": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the difference including, optionally, scores when the _WITHSCORES_ option is used." - ], - "ZDIFFSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at _destination_." - ], - "ZINCRBY": [ - "[Double reply](../../develop/reference/protocol-spec#doubles): the new score of _member_." - ], - "ZINTER": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): the result of the intersection including, optionally, scores when the _WITHSCORES_ option is used." - ], - "ZINTERCARD": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting intersection." - ], - "ZINTERSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the resulting sorted set at the _destination_." - ], - "ZLEXCOUNT": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members in the specified score range." - ], - "ZMPOP": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): when no element could be popped.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): A two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of the popped elements. Every entry in the elements array is also an array that contains the member and its score." - ], - "ZMSCORE": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the member does not exist in the sorted set.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of [Double reply](../../develop/reference/protocol-spec#doubles) _member_ scores as double-precision floating point numbers." - ], - "ZPOPMAX": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores." - ], - "ZPOPMIN": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of popped elements and scores." - ], - "ZRANDMEMBER": [ - "[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): without the additional _count_ argument, the command returns a randomly selected member, or [Null reply](../../develop/reference/protocol-spec#nulls) when _key_ doesn't exist.", - "[Array reply](../../develop/reference/protocol-spec#arrays): when the additional _count_ argument is passed, the command returns an array of members, or an empty array when _key_ doesn't exist. If the _WITHSCORES_ modifier is used, the reply is a list of members and their scores from the sorted set." - ], - "ZRANGE": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range with, optionally, their scores when the _WITHSCORES_ option is given." - ], - "ZRANGEBYLEX": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of elements in the specified score range." - ], - "ZRANGEBYSCORE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members with, optionally, their scores in the specified score range." - ], - "ZRANGESTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set." - ], - "ZRANK": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or the member does not exist in the sorted set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): the rank of the member when _WITHSCORE_ is not used.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): the rank and score of the member when _WITHSCORE_ is used." - ], - "ZREM": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of members removed from the sorted set, not including non-existing members." - ], - "ZREMRANGEBYLEX": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed." - ], - "ZREMRANGEBYRANK": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed." - ], - "ZREMRANGEBYSCORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): Number of members removed." - ], - "ZREVRANGE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of members in the specified range, optionally with their scores if _WITHSCORE_ was used." - ], - "ZREVRANGEBYLEX": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): List of the elements in the specified score range." - ], - "ZREVRANGEBYSCORE": [ - "* [Array reply](../../develop/reference/protocol-spec#arrays): a list of the members and, optionally, their scores in the specified score range." - ], - "ZREVRANK": [ - "One of the following:", - "* [Null reply](../../develop/reference/protocol-spec#nulls): if the key does not exist or the member does not exist in the sorted set.", - "* [Integer reply](../../develop/reference/protocol-spec#integers): The rank of the member when _WITHSCORE_ is not used.", - "* [Array reply](../../develop/reference/protocol-spec#arrays): The rank and score of the member when _WITHSCORE_ is used." - ], - "ZSCAN": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): cursor and scan response in array form." - ], - "ZSCORE": [ - "One of the following:", - "* [Double reply](../../develop/reference/protocol-spec#doubles): the score of the member (a double-precision floating point number).", - "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if _member_ does not exist in the sorted set, or the key does not exist." - ], - "ZUNION": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): the result of the union with, optionally, their scores when _WITHSCORES_ is used." - ], - "ZUNIONSTORE": [ - "[Integer reply](../../develop/reference/protocol-spec#integers): the number of elements in the resulting sorted set." - ] -} diff --git a/layouts/commands/single.html b/layouts/commands/single.html index 36500e0f5..89efd5a7b 100644 --- a/layouts/commands/single.html +++ b/layouts/commands/single.html @@ -66,38 +66,6 @@

{{ .Content }} - {{ $resp2 := index .Site.Data.resp2_replies .Params.title }} - {{ $resp3 := index .Site.Data.resp3_replies .Params.title }} - {{ if and $resp2 $resp3 }} - {{ $same := false }} - {{ $responses := slice }} - {{ $complement := complement $resp2 $resp3 }} - {{ if eq (len $complement) 0 }} - {{ $same = true }} - {{ $responses = $responses | append (dict "response" $resp2) }} - {{ printf "## RESP2/RESP3 Reply" | markdownify }} - {{ else }} - {{ $responses = $responses | append (dict "response" $resp2) }} - {{ $responses = $responses | append (dict "response" $resp3) }} - {{ end }} - - {{ $respver := 2 }} - {{ range $response := $responses }} - {{ with $response.response }} - {{ if eq $same false }} - {{ printf "## RESP%d Reply" $respver | markdownify }} - {{ $respver = add $respver 1 }} - {{ end }} - {{ $mergedString := "" }} - {{ range . }} - {{ $mergedString = print $mergedString . "\n" }} - {{ end }} - {{ $processedContent := $mergedString | markdownify }} - {{ $processedContent }} - {{ end }} - {{ end }} - {{ end }} -
{{ if isset .Params "history" }}

History