DBSIZE
Syntax
DBSIZE
Module
genericCategories
fast read keyspaceDescription
Return the number of keys in the currently-selected database.
Examples
- Go (Embedded)
- CLI
Get the number of keys in the database:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
key, err := db.DBSize()
Get the number of keys in the database:
> DBSIZE