incrbyfloat
INCRBYFLOAT
INCRBYFLOAT key increment
Increment the string representing a floating point number stored at key
by the specified increment
. By using a negative increment
value, the result is that the value stored at the key is decremented (by the obvious properties of addition). If the key does not exist, it is set to 0
before performing the operation. An error is returned if one of the following conditions occur:
- The key contains a value of the wrong type (not a string).
- The current key content or the specified increment are not parsable as a double precision floating point number.
If the command is successful the new incremented value is stored as the new value of the key (replacing the old one), and returned to the caller as a string.
登录查看完整内容