HVALS
HVALS key
- Group
- Hash
- Complexity
- O(N) where N is the size of the hash
- Arity
- 2 (exactly, counting the command name)
- Flags
- read-only
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- All plans
- On-Premise
- no license needed
HVALS returns every value in the hash stored at key, without the field
names. The order is not defined. If you need fields and values together, use
HGETALL.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Hash exists | Array of bulk strings: the values | Same |
| Key does not exist | Empty array | Same |
HVALS replies with a WRONGTYPE error if key holds a value that is not a
hash.
Examples
Section titled “Examples”127.0.0.1:6379> HSET user:1 name "Ada" lang "en"(integer) 2127.0.0.1:6379> HVALS user:11) "Ada"2) "en"Compatibility
Section titled “Compatibility”Same as Redis 7.4 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.