TYPE
Since 1.1.0KeysChanged in 1.2.1
Syntax
TYPE keyHistory
- 1.2.1: acl categories: removed generic
Returns the type of the value at key.
Reply
A simple string, one of:
| Type | Value |
|---|---|
string | a string |
list | a list |
set | a set |
zset | a sorted set |
hash | a hash |
stream | a stream |
ReJSON-RL | a JSON document, the name Redis's JSON module uses |
none | no such key |
Examples
> SET a 1
OK
> TYPE a
string
> JSON.SET j $ 1
OK
> TYPE j
ReJSON-RL
> TYPE missing
none