Skip to main content

ZPOPMAX

Syntax​

ZPOPMAX key [count]

Module​

sortedset

Categories​

write slow sortedset

Description​

Removes and returns 'count' number of members in the sorted set with the highest scores. Default count is 1.

Examples​

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)