Redis Hvals 命令

更新时间: 2019-07-07 15:54

Redis Hvals 命令返回哈希表所有域(field)的值。

语法

redis 127.0.0.1:6379> HVALS KEY_NAME FIELD VALUE 

返回值

一个包含哈希表中所有域(field)值的列表。 当 key 不存在时,返回一个空表。

实例

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)

查看更多 Redis 哈希(Hash)命令

High Performance JavaScript

High Performance JavaScript

Nicholas C. Zakas / O'Reilly Media / 2010-4-2 / USD 34.99

If you're like most developers, you rely heavily on JavaScript to build interactive and quick-responding web applications. The problem is that all of those lines of JavaScript code can slow down your ......一起来看看 《High Performance JavaScript》 这本书的介绍吧!

JS 压缩/解压工具

JS 压缩/解压工具

在线压缩/解压 JS 代码

UNIX 时间戳转换

UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具

HEX CMYK 转换工具

HEX CMYK 互转工具