Skip to main content

DEL

Syntax

DEL key [key ...]

Module

generic

Categories

fast keyspace write

Description

Removes one or more keys from the store.

Examples

Delete a single key:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
noOfDeletedKeys, err = db.Del("key1")

Delete multiple keys:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
noOfDeletedKeys, err = db.Del("key1", "key2", "key3")