Redis Learning Note – 07 Command in Redis (Hash)
HMGET key field [field …]
Returns the values associated with the specified fields in the hash stored at key.
For every field that does not exist in the hash, a nil value is returned. Because a non-existing keys are treated as empty hashes, running HMGET against a non-existing key will return a list of nil values.
HDEL key field [field …]
Removes the specified fields from the hash stored at key. Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0.
Returns the number of fields contained in the hash stored at key.
HEXISTS key field
Returns if field is an existing field in the hash stored at key.
Returns all field names in the hash stored at key.
Returns all values in the hash stored at key.
Returns all fields and values of the hash stored at key. In the returned value, every field name is followed by its value, so the length of the reply is twice the size of the hash.
HINCRBY key field increment
Increments the number stored at field in the hash stored at key by increment. The range of values supported by HINCRBY is limited to 64 bit signed integers.
HINCRBYFLOAT key field increment
Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment. An error is returned if one of the following conditions occur:
The field contains a value of the wrong type (not a string).
The current field content or the specified increment are not parsable as a double precision floating point number.