TYPE
Syntax
TYPE key
Module
genericCategories
fast keyspace readDescription
Returns the string representation of the value type stored at the key. The types that can be returned are string, integer, float, list, set, set, and hash.
Examples
- Go (Embedded)
- CLI
Retrieve the type of the value stored at key:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
type, err := db.Type("key")
Retrieve the type of the value stored at key:
> TYPE key