hexists.3valkey - Man Page
Determines whether a field exists in a hash.
Synopsis
HEXISTS
key field
Description
Returns if field
is an existing field in the hash stored at key
.
Reply
One of the following:
- valkey-protocol(7) Integer reply:
0
if the hash does not contain the field, or the key does not exist. - valkey-protocol(7) Integer reply:
1
if the hash contains the field.
Complexity
O(1)
Acl Categories
@fast @hash @read
History
- Available since: 2.0.0
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
See Also
hdel(3valkey), hget(3valkey), hgetall(3valkey), hincrby(3valkey), hincrbyfloat(3valkey), hkeys(3valkey), hlen(3valkey), hmget(3valkey), hrandfield(3valkey), hscan(3valkey), hset(3valkey), hsetnx(3valkey), hstrlen(3valkey), hvals(3valkey)
Info
2024-09-23 8.0.0 Valkey Command Manual