Skip to main content

ZMPOP

Syntax

ZMPOP key [key ...] <MIN | MAX> [COUNT count]

Module

sortedset

Categories

write slow sortedset

Description

Pop a 'count' elements from multiple sorted sets. MIN or MAX determines whether to pop elements with the lowest or highest scores respectively.

Examples

Pop a 'count' elements from multiple sorted sets:

vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
sortedSets, err := vault.ZMPop([]string{"key1", "key2"}, echovault.ZMPopOptions{Min: true, Count: 2})