Skip to main content

EXISTS

Syntax

EXISTS

Module

generic

Categories

fast read keyspace

Description

Returns the number of keys that exists from the provided list of keys. Note: If duplicate keys are provided, each one is counted separately.

Examples

Return the number of keys that exists:

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