redis HGETALL command


  Translation results:

get

英[get] 美[ɡɛt]

vt. Get; catch; persuade; receive (punishment, etc.)

vt.& vi. Arrive, come

vi. Become; start; try to deal with; obtain benefits or wealth

n. Reproduce, cub; profit

Third person singular : gets Present participle: getting Past tense: got Past participle: got gotten

all

## English[ɔ:l] US[ɔl]

adj. all; all; various; extreme, as much as possible

pron. all; everything; everyone, every thing; all situations

adv. completely; completely land; each; very

n.whole; [often used as A-]whole; [often used with my, your, his, her, etc.] everything that (someone) has

redis HGETALL commandsyntax

Function: Return all fields and values ​​in the hash table key. In the return value, immediately following each field name is the value of the field, so the length of the return value is twice the size of the hash table.

Syntax: HGETALL key

Available versions: >= 2.0.0

Time complexity: O(N), N is the size of the hash table.

Return: Return the domain and domain value of the hash table in list form. If key does not exist, an empty list is returned.

redis HGETALL commandexample

redis> HSET people jack "Jack Sparrow"
(integer) 1
redis> HSET people gump "Forrest Gump"
(integer) 1
redis> HGETALL people
1) "jack"          # 域
2) "Jack Sparrow"  # 值
3) "gump"
4) "Forrest Gump"

Home

Videos

Q&A