HEXISTS · Valkey

HEXISTS

Determines whether a field exists in a hash.

Usage

HEXISTS key field

Description

Returns if field is an existing field in the hash stored at key.

Reply

One of the following:

Complexity

O(1)

ACL Categories

@fast @hash @read

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

History

See also

HDEL, HGET, HGETALL, HINCRBY, HINCRBYFLOAT, HKEYS, HLEN, HMGET, HRANDFIELD, HSCAN, HSET, HSETNX, HSTRLEN, HVALS.