HGETALL

语法
HGETALL key
从以下位置开始可用:
2.0.0
时间复杂度:
O(N),其中 N 是哈希的大小。
ACL 类别:
@read, @hash, @slow,

返回存储在key. 在返回的值中,每个字段名称后跟其值,因此长度 的回复是哈希大小的两倍。

例子

Give these commands a try in the interactive console:

HSET myhash field1 "Hello" HSET myhash field2 "World" HGETALL myhash

RESP2 Reply

Array reply: a list of fields and their values stored in the hash, or an empty list when key does not exist.

RESP3 Reply

Map reply: a map of fields and their values stored in the hash, or an empty list when key does not exist.
RATE THIS PAGE
Back to top ↑