HLEN
Syntax
HLEN key
Module
hashCategories
fast hash readDescription
Returns the number of fields in the hash.
Examples
- Go (Embedded)
- CLI
Retrieve the number of fields in the hash:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
length, err := db.HLen("key")
Retrieve the number of fields in the hash:
> HLEN key