DEL
Syntax
DEL key [key ...]
Module
genericCategories
fast keyspace writeDescription
Removes one or more keys from the store.
Examples
- Go (Embedded)
- CLI
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")
Delete a single key:
> DEL key
Delete multiple keys:
> DEL key1 key2 key3