GETDEL
Syntax
GETDEL key
Module
genericCategories
fast writeDescription
Get the value of key and delete the key. This command is similar to [GET], but deletes key on success.
Examples
- Go (Embedded)
- CLI
Get the value at the specified key:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
value, err := db.GetDel("key")
Get the value at the specified key:
> GETDEL key