String

INCRBYFLOAT

Increment the float value of a key by a given number.

If a key does not exist, it is initialized as 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.

Arguments

keybodystrrequired

The key to decrement.

incrementbodyfloatrequired

The amount to increment by.

Response

floatrequired

The value at the key after the incrementing.

Example
redis.set("key", 6)# returns 10.5redis.incrbyfloat("key", 4,5)
Loading search…