TYPE
Syntax
TYPE key
- Available since:
- 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@keyspace
,@read
,@fast
,
Returns the string representation of the type of the value stored at key
.
The different types that can be returned are: string
, list
, set
, zset
,
hash
and stream
.
Examples
RESP2/RESP3 Reply
Simple string reply: the type of key, ornone
when key doesn't exist.