Optional
blockingOptional
dataUsed for "database" commands to enforce type checking.
Private
loggerMaximum number of parameters allowed. -1 for no maximum.
Minimum number of parameters require.
Optional
pubUsed when PUB/SUB is in effect.
Sign is used in commands with a compliment command. The only current example is INCR/DECR. Sign is 1 for INCR and -1 for DECR
Optional
txUsed in transactions to enqueue a command.
Every command must implement the execute method.
Available since v1.0.0
This command implements both INCR and DECR by a flag passed during instantiation.
Increments the number stored at key by one. If the key does not exist, it is set to 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. This operation is limited to 53 bit signed integers. Note that redis actually supports 64 bit integers, but javascript does not.
Number.MAX_SAFE_INTEGER is 9007199254740991
Note: this is a string operation because Redis does not have a dedicated integer type. The string stored at the key is interpreted as a base-10 53 bit signed integer to execute the operation.
Redis stores integers in their integer representation, so for string values that actually hold an integer, there is no overhead for storing the string representation of the integer.
Return value Integer reply: the value of key after the increment