Skip to main content

HLEN

Syntax

HLEN key

Module

hash

Categories

fast hash read

Description

Returns the number of fields in the hash.

Examples

Retrieve the number of fields in the hash:

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