Redis Zscore 命令

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

Redis Zscore 命令返回有序集中,成员的分数值。 如果成员元素不是有序集 key 的成员,或 key 不存在,返回 nil 。

语法

redis Zscore 命令基本语法如下:

redis 127.0.0.1:6379> ZSCORE key member

可用版本

>= 1.2.0

返回值

成员的分数值,以字符串形式表示。

实例

redis 127.0.0.1:6379> ZRANGE salary 0 -1 WITHSCORES    # 测试数据
1) "tom"
2) "2000"
3) "peter"
4) "3500"
5) "jack"
6) "5000"

redis 127.0.0.1:6379> ZSCORE salary peter              # 注意返回值是字符串
"3500"

查看更多 Redis 有序集合(sorted set)命令

Python Machine Learning

Python Machine Learning

Sebastian Raschka / Packt Publishing - ebooks Account / 2015-9 / USD 44.99

About This Book Leverage Python' s most powerful open-source libraries for deep learning, data wrangling, and data visualization Learn effective strategies and best practices to improve and opti......一起来看看 《Python Machine Learning》 这本书的介绍吧!

RGB转16进制工具

RGB转16进制工具

RGB HEX 互转工具

URL 编码/解码

URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具

HEX CMYK 转换工具

HEX CMYK 互转工具