ZPOPMAX
Syntax
ZPOPMAX key [count]
Module
sortedsetCategories
write slow sortedsetDescription
Removes and returns 'count' number of members in the sorted set with the highest scores. Default count is 1.
Examples
- Go (Embedded)
- CLI
Remove and return 'count' number of members in the sorted set with the highest scores:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
members, err := db.ZPopMax("key", 2)
Remove and return 'count' number of members in the sorted set with the highest scores:
> ZPOPMAX key 2