HGETALL

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

Synopsis

HGETALL keyThis command fetches the full content of all fields and all values of the hash that is associated with the given key.

  • If the given key does not exist, and empty list is returned.
  • If the given key is associated with non-hash data, an error is raised.

Return Value

Returns list of fields and values.

Examples

You can do this as shown below.

  1. $ HSET yugahash area1 "Africa"
  1. 1
  1. $ HSET yugahash area2 "America"
  1. 1
  1. $ HGETALL yugahash
  1. 1) area1
  2. 2) "Africa"
  3. 3) area2
  4. 4) "America"

See Also

hdel, hexists, hget, hkeys, hlen, hmget, hmset, hset, hincrby, hstrlen, hvals