FLUSHDB
Syntax
FLUSHDB
Module
genericCategories
dangerous keyspace slow writeDescription
Delete all the keys in the currently selected database. This command is always synchronous.
Examples
- Go (Embedded)
- CLI
For the embedded instance, you need to pass the database index to the Flush
method:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
db.Flush(0)
Flush the database that the current connection is operating from:
FLUSHDB