comando Redis Hvals
Redis comando Hvals retorna os valores da tabela de hash para todos os campos.
gramática
Redis Hvals sintaxe de comando básica é a seguinte:
redis 127.0.0.1:6379> HVALS KEY_NAME FIELD VALUE
versões disponíveis
> = 2.0.0
Valor de retorno
Uma tabela de todos os valores contidos na tabela. Quando a chave não existir, ele retorna uma tabela vazia.
Exemplos
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> HVALS myhash 1) "foo" 2) "bar" # 空哈希表/不存在的key redis 127.0.0.1:6379> EXISTS not_exists (integer) 0 redis 127.0.0.1:6379> HVALS not_exists (empty list or set)