MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / INCR

Method INCR

strings.go:259–261  ·  view source on GitHub ↗

INCR increments the number stored at the key by 1 (n = n + 1) 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 operation will throw an erro

(key string)

Source from the content-addressed store, hash-verified

257//
258// Works similar to https://redis.io/commands/incr
259func (c Client) INCR(key string) (after int64, err error) {
260 return c.INCRBY(key, 1)
261}
262
263// DECR decrements the number stored at the key by 1 (n = n - 1) and returns the new value. If the
264// key does not exist, it will be initialized with zero before applying the operation.

Callers 2

XADDMethod · 0.95
TestCountersFunction · 0.80

Calls 1

INCRBYMethod · 0.95

Tested by 1

TestCountersFunction · 0.64