HKEYS
This page documents the preview (v2.21) version. Preview includes features under active development and is for development and testing only. For production, use the stable (v2024.1) version.
Synopsis
HKEYS key
This command fetches all fields of the hash that is associated with the given key.
- If the
keydoes not exist, an empty list is returned. - If the
keyis associated with non-hash data, an error is raised.
Return value
Returns list of fields in the specified hash.
Examples
$ HSET yugahash area1 "Africa"
1
$ HSET yugahash area2 "America"
1
$ HKEYS yugahash
1) "area1"
2) "area2"
See also
hdel, hexists, hget, hgetall, hlen, hmget, hmset, hset, hincrby, hstrlen, hvals