Saturday 18 April 2015

HMGET key field1 field2 ... fieldN

Syntax
HMGET key field1 field2 ... fieldN
Returns the values associated with the fields for given hash key. If field not exist, then nil returned. If the key not exist, then list of nil values returned.


127.0.0.1:6379> hmset employee 1 "Sudheer" 2 "Kiran Kumar" 3 "Naveen" 4 "PTR PTR" 
OK 
127.0.0.1:6379> hmget employee 4 2 5 1 
1) "PTR PTR" 
2) "Kiran Kumar" 
3) (nil) 
4) "Sudheer" 
127.0.0.1:6379> hmget student 4 2 5 1 
1) (nil) 
2) (nil) 
3) (nil) 
4) (nil) 

Prevoius                                                 Next                                                 Home

No comments:

Post a Comment