MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / SCARD

Method SCARD

sets.go:62–64  ·  view source on GitHub ↗

SCARD returns the cardinality (the number of elements) in the set at key. Cost is O(size) / 1 WCU per 4KB of data counted. Works similar to https://redis.io/commands/scard

(key string)

Source from the content-addressed store, hash-verified

60//
61// Works similar to https://redis.io/commands/scard
62func (c Client) SCARD(key string) (count int64, err error) {
63 return c.HLEN(key)
64}
65
66func (c Client) SDIFF(key string, subtractKeys ...string) (members []string, err error) {
67 memberSet := make(map[string]struct{})

Callers 2

TestBasicSetsFunction · 0.80
TestSetModifiersFunction · 0.80

Calls 1

HLENMethod · 0.95

Tested by 2

TestBasicSetsFunction · 0.64
TestSetModifiersFunction · 0.64