Syntax
HINCRBYFLOAT key field
increment
Increment the value of the
field with “increment” value. If key doesn't exist, then key is
created. If the field doesn't exist the value is set to 0 before the
operation is performed.
Returns
The value at field after the
increment operation.
127.0.0.1:6379> hgetall marks 1) "Krishna" 2) "100" 3) "Arjun" 4) "95" 5) "Gopi" 6) "87" 127.0.0.1:6379> hincrbyfloat marks "Arjun" 4.5 "99.5" 127.0.0.1:6379> hgetall marks 1) "Krishna" 2) "100" 3) "Arjun" 4) "99.5" 5) "Gopi" 6) "87" 127.0.0.1:6379>
No comments:
Post a Comment