SINTERSTORE
Syntax
SINTERSTORE destination key [key...]
Module
setCategories
set slow writeDescription
Stores the intersection of multiple sets at the destination key.
Examples
- Go (Embedded)
- CLI
Get the difference between 2 sets:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
cardinality, err := db.SInterStore("destination", "key1", "key2")
Get the difference between 2 sets:
> SINTERSTORE destination key1 key2