类型
Syntax
TYPE key
- Available since:
- 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@keyspace
,@read
,@fast
,
返回存储在key
中的值的类型的字符串表示形式。
可以返回的不同类型有:string
, list
, set
, zset
,
hash
和 stream
。
示例
RESP2/RESP3 回复
Simple string reply: the type of key, ornone
when key doesn't exist.