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:
vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
members, err := vault.ZPopMax("key", 2)
Remove and return 'count' number of members in the sorted set with the highest scores:
> ZPOPMAX key 2