HEXISTS

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

Check whether a field exists

Usage: hexists key field
Returns 1 if it exists, 0 if it does not.

Example

Command>hexists user-1 email
Result>1
Command>hexists user-1 xxx
Result>0


Syntax

HEXISTS key field

  • Available since version 2.0.0.
  • Time complexity is O(1).
Related commands HSET, HMGET, MSET, LPUSH, SADD, ZSET
Clients for Java Jedis, Lettuce, Redisson
Clients for C Hiredis

<< HINCRBYFLOAT HEXISTS HSETNX >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.