Skip to main content

ZPOPMIN

Syntax

ZPOPMIN key [count]

Module

sortedset

Categories

write slow sortedset

Description

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

Examples

Remove and return 'count' number of members in the sorted set with the lowest scores:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
members, err := db.ZPopMin("key", 2)