ZREMRANGEBYRANK
Syntax
ZREMRANGEBYRANK key min max
Module
sortedsetCategories
write slow sortedsetDescription
Removes the elements in the rank range between start and stop. The elements are ordered from lowest score to highest score.
Examples
- Go (Embedded)
- CLI
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)
Remove the elements in the rank range between start and stop:
> ZREMRANGEBYRANK key 3 7