Redis Hexists 命令

Redis 教程 · 2019-03-07 08:57:53

Redis Hexists 命令用于查看哈希表的指定字段是否存在。

语法

redis Hexists 命令基本语法如下:

redis 127.0.0.1:6379> HEXISTS KEY_NAME FIELD_NAME 

可用版本

>= 2.0.0

返回值

如果哈希表含有给定字段,返回 1 。 如果哈希表不含有给定字段,或 key 不存在,返回 0 。

实例

redis 127.0.0.1:6379> HSET myhash field1 "foo"
(integer) 1
redis 127.0.0.1:6379> HEXISTS myhash field1
(integer) 1
redis 127.0.0.1:6379> HEXISTS myhash field2
(integer) 0

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

查看所有标签

The Probabilistic Method

The Probabilistic Method

Noga Alon、Joel H. Spencer / Wiley-Interscience / 2008-8-11 / USD 137.00

Praise for the Second Edition : "Serious researchers in combinatorics or algorithm design will wish to read the book in its entirety...the book may also be enjoyed on a lighter level since the diffe......一起来看看 《The Probabilistic Method》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具