HEXISTS
Redis手册 / 哈希表
HEXISTS hash field
可用版本: >= 2.0.0
时间复杂度: O(1)
检查给定域 field 是否存在于哈希表 hash 当中。
返回值
HEXISTS 命令在给定域存在时返回 1 , 在给定域不存在时返回 0 。
代码示例
给定域不存在:
1redis> HEXISTS phone myphone2(integer) 0给定域存在: 1(integer) 12 3redis> HEXISTS phone myphone4(integer) 1```