TYPE | SugarDB (original) (raw)
Syntax
TYPE key
Module
generic
Categories
fast keyspace read
Description
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")