*Redis command-docs 命令
*语法
COMMAND DOCS [command-name [command-name ...]]
返回命令的文档信息。
默认情况下,回复包括服务器的所有命令。 您可以使用可选的 command-name 参数来指定一个或多个命令的名称。
回复包含每个返回命令的映射。 映射回复中可能包含以下键:
- summary: 命令的简短描述。
- since: 添加该命令的 Redis 版本(对于模块命令,是模块版本)。
- group: 命令所属的功能组。
可能的值有:
- bitmap
- cluster
- connection
- generic
- geo
- hash
- hyperloglog
- list
- module
- pubsub
- scripting
- sentinel
- server
- set
- sorted-set
- stream
- string
- transactions
- complexity: 关于命令时间复杂度的简短说明。
- doc_flags: 文档标志数组。
可能的值有:
- deprecated: 命令已弃用。
- syscmd: 不应由用户调用的系统命令。
- deprecated_since: 弃用该命令的 Redis 版本(对于模块命令,是模块版本)。
- replaced_by: 弃用命令的替代方案。
- history: 描述命令输出或参数更改的历史注释数组。它不应包含行为变更的信息。
每个条目本身都是一个数组,由两个元素组成:
- 该条目适用的 Redis 版本。
- 变更的描述。
- arguments: 描述命令参数的映射数组。 有关更多信息,请参阅 Redis 命令参数 页面。
*示例
redis>
COMMAND DOCS SET
1) "set"
2) 1) "summary"
2) "Set the string value of a key"
3) "since"
4) "1.0.0"
5) "group"
6) "string"
7) "complexity"
8) "O(1)"
9) "history"
10) 1) 1) "2.6.12"
2) "Added the `EX`, `PX`, `NX` and `XX` options."
2) 1) "6.0.0"
2) "Added the `KEEPTTL` option."
3) 1) "6.2.0"
2) "Added the `GET`, `EXAT` and `PXAT` option."
4) 1) "7.0.0"
2) "Allowed the `NX` and `GET` options to be used together."
11) "arguments"
12) 1) 1) "name"
2) "key"
3) "type"
4) "key"
5) "key_spec_index"
6) (integer) 0
2) 1) "name"
2) "value"
3) "type"
4) "string"
3) 1) "name"
2) "condition"
3) "type"
4) "oneof"
5) "since"
6) "2.6.12"
7) "flags"
8) 1) "optional"
9) "arguments"
10) 1) 1) "name"
2) "nx"
3) "type"
4) "pure-token"
5) "token"
6) "NX"
2) 1) "name"
2) "xx"
3) "type"
4) "pure-token"
5) "token"
6) "XX"
4) 1) "name"
2) "get"
3) "type"
4) "pure-token"
5) "token"
6) "GET"
7) "since"
8) "6.2.0"
9) "flags"
10) 1) "optional"
5) 1) "name"
2) "expiration"
3) "type"
4) "oneof"
5) "flags"
6) 1) "optional"
7) "arguments"
8) 1) 1) "name"
2) "seconds"
3) "type"
4) "integer"
5) "token"
6) "EX"
7) "since"
8) "2.6.12"
2) 1) "name"
2) "milliseconds"
3) "type"
4) "integer"
5) "token"
6) "PX"
7) "since"
8) "2.6.12"
3) 1) "name"
2) "unix-time-seconds"
3) "type"
4) "unix-time"
5) "token"
6) "EXAT"
7) "since"
8) "6.2.0"
4) 1) "name"
2) "unix-time-milliseconds"
3) "type"
4) "unix-time"
5) "token"
6) "PXAT"
7) "since"
8) "6.2.0"
5) 1) "name"
2) "keepttl"
3) "type"
4) "pure-token"
5) "token"
6) "KEEPTTL"
7) "since"
8) "6.0.0"