Saturday 18 April 2015

HEXISTS key field

Syntax
HEXISTS key field
Return 1 if the hash key contains field, else 0 if the hash does not contain field, or key does not exist.

127.0.0.1:6379> hgetall employee 
1) "1" 
2) "Sudheer" 
3) "2" 
4) "Kiran Kumar" 
5) "3" 
6) "Naveen" 
7) "4" 
8) "PTR PTR" 
127.0.0.1:6379> hexists employee 2 
(integer) 1 
127.0.0.1:6379> hexists employee 5 
(integer) 0 
127.0.0.1:6379> hexists student 5 
(integer) 0 


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment