LREM
Syntax
LREM key count element
Module
listCategories
list write slowDescription
Remove <count>
elements from list.
Examples
- Go (Embedded)
- CLI
Remove 2 instances if "value1" from the list at key:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
ok, err := db.Lrem("key", 2, "value1")
Remove 2 instances if "value1" from the list at key:
> LREM key 2 value1