Skip to main content

SCARD

Syntax

SCARD key

Module

set

Categories

fast set read

Description

Returns the cardinality of the set.

Examples

Get the set's cardinality:

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