Skip to main content

ZREMRANGEBYRANK

Syntax

ZREMRANGEBYRANK key min max

Module

sortedset

Categories

write slow sortedset

Description

Removes the elements in the rank range between start and stop. The elements are ordered from lowest score to highest score.

Examples

Remove the elements in the rank range between start and stop:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
deletedCount, err := vault.ZRemRangeByRank("key", 3, 7)