INCRBY increments the number stored at the key with the given delta (n = n + delta) and returns the new value. If the key does not exist, it will be initialized with zero before applying the operation. If there is an existing value at the key with a non-numeric type (string, bytes, etc.) the operat
(key string, delta int64)
| 285 | // |
| 286 | // Works similar to https://redis.io/commands/incrby |
| 287 | func (c Client) INCRBY(key string, delta int64) (after int64, err error) { |
| 288 | rv, err := c.incr(key, IntValue{delta}) |
| 289 | if err == nil { |
| 290 | after = rv.Int() |
| 291 | } |
| 292 | |
| 293 | return |
| 294 | } |
| 295 | |
| 296 | // DECRBY decrements the number stored at the key with the given delta (n = n - delta) and returns the new value. If the |
| 297 | // key does not exist, it will be initialized with zero before applying the operation. |