Skip to main content

DBSIZE

Syntax

DBSIZE

Module

generic

Categories

fast read keyspace

Description

Return the number of keys in the currently-selected database.

Examples

Get the number of keys in the database:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
key, err := db.DBSize()