Latest web development tutorials

comando Redis Hkeys

Redis hash (hash)

Redis comando Hkeys viene utilizzato per ottenere una tabella hash di tutti i nomi dei campi.

grammatica

Redis Hkeys sintassi dei comandi di base è la seguente:

redis 127.0.0.1:6379> HKEYS KEY_NAME FIELD_NAME INCR_BY_NUMBER 

versioni disponibili

> = 2.0.0

Valore di ritorno

Lista tabella hash contiene tutti i campi. Quando la chiave non esiste, restituisce una lista vuota.

Esempi

redis 127.0.0.1:6379> HSET myhash field1 "foo"
(integer) 1
redis 127.0.0.1:6379> HSET myhash field2 "bar"
(integer) 1
redis 127.0.0.1:6379> HKEYS myhash
1) "field1"
2) "field2"

Redis hash (hash)