Sorted Set

ZINCRBY

Increment the score of a member.

Arguments

keybodystringrequired

The key of the sorted set.

incrementbodyintegerrequired

The increment to add to the score.

memberbodyTMemberrequired

The member to increment.

Response

integerrequired

The new score of member after the increment operation.

Example
await redis.zadd("key", 1, "member");const value = await redis.zincrby("key", 2, "member");console.log(value); // 3
Loading search…