Available since 1.2.0.

ZINCRBY key increment member

Increments the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). If key does not exist, a new sorted set with the specified member as its sole member is created.

An error is returned when key exists but does not hold a sorted set.

The score value should be the string representation of a numeric value, and accepts double precision floating point numbers. It is possible to provide a negative value to decrement the score.

There is no compliment ZDECRBY. Us a negative increment for that

Return value
Bulk string reply: the new score of member (a double precision floating point number), represented as string.

Hierarchy

Constructors

Properties

DbDataType: DataType = DataType.ZSET
blocking?: boolean
dataType?: DataType

Used for "database" commands to enforce type checking.

logger: Logger = ...
maxParams: number = 3

Maximum number of parameters allowed. -1 for no maximum.

minParams: number = 3

Minimum number of parameters require.

name: string = "zincrby"
pubSubAllowed?: boolean

Used when PUB/SUB is in effect.

sign?: number

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

txIgnore?: boolean

Used in transactions to enqueue a command.

Methods