Learn R Programming

rredis (version 1.6.9)

redisIncrBy: Increment a value by the specified value.

Description

Increment the value corresponding to the specified key.

Usage

redisIncrBy(key, value)

Arguments

key
A key corresponding to the value to increment.
value
The value to increment by (integer, numeric, or character).

Value

  • The new value of key after the increment, returned as an integer.

Details

The value should be an integer (redisIncrBy) or a numeric value (redisIncrByFloat). If the key does not exist or contains a value of a wrong type, set the key to the value of "0" before to perform the operation.

References

http://redis.io/commands

See Also

redisIncr

Examples

Run this code
redisSet('x','5')
redisIncrBy('x','3')

Run the code above in your browser using DataLab