Index
Connection Methods
Other Methods
Server Methods
Connection Methods
echo
- echo(message: string): Promise<string>
-
Parameters
Returns Promise<string>
ping
- ping(msg?: string): Promise<string>
-
Parameters
Returns Promise<string>
select
- select(db: number): Promise<string>
-
Parameters
Returns Promise<string>
查看原始定义
Other Methods
command_count
- command_count(): Promise<number>
command_info
- command_info(command: string, ...commands: string[]): Promise<{}>
-
Parameters
-
command: string
-
Rest ...commands: string[]
Returns Promise<{}>
on
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
once
-
Parameters
-
event: string | symbol
-
listener: (...args: any[]) => void
Server Methods
flushdb
- flushdb(async?: boolean): Promise<"OK">
-
Parameters
Returns Promise<"OK">
查看原始定义
info
- info(section?: "server" | "clients" | "memory" | "persistence" | "stats" | "replication" | "cpu" | "commandstats" | "cluster" | "keyspace" | "all" | "defaultƒ"): Promise<RedisServerInfo>
-
Parameters
-
Optional section: "server" | "clients" | "memory" | "persistence" | "stats" | "replication" | "cpu" | "commandstats" | "cluster" | "keyspace" | "all" | "defaultƒ"
直接返回 msg 本身。
例子: