This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
INCRBYFLOAT
Josh Baker edited this page Oct 11, 2016
·
7 revisions
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:
Bulk string reply: the value of key after the increment.
> SET mykey 10.50
OK
> INCRBYFLOAT mykey 0.1
"10.6"
> INCRBYFLOAT mykey -5
"5.6"
> SET mykey 5.0e3
OK
> INCRBYFLOAT mykey 2.0e2
"5200"
APPEND, BITCOUNT, BITOP, BITPOS, DBSIZE, DECR, DECRBY, DEL, EXISTS, EXPIRE, EXPIREAT, FLUSHDB, GET, GETBIT, GETRANGE, GETSET, INCR, INCRBY, INCRBYFLOAT, KEYS, MGET, MSET, MSETNX, PDEL, PERSIST, PEXPIRE, PEXPIREAT, PTTL, RENAME, RENAMENX, SET, SETBIT, SETRANGE, STRLEN, TTL