- Usage:
-
HEXISTS key field
- Complexity:
- O(1)
- Since:
- 2.0.0
- ACL Categories:
- @fast, @hash, @read
- Integer:
0if the hash does not contain the field, or the key does not exist. - Integer:
1if the hash contains the field.
Returns if field is an existing field in the hash stored at key.
Reply
One of the following:
Examples
127.0.0.1:6379> HSET myhash field1 "foo"
(integer) 1
127.0.0.1:6379> HEXISTS myhash field1
(integer) 1
127.0.0.1:6379> HEXISTS myhash field2
(integer) 0