MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / SCard

Method SCard

structure/set.go:93–99  ·  view source on GitHub ↗

SCard gets the cardinality (size) of a set

(key string)

Source from the content-addressed store, hash-verified

91
92// SCard gets the cardinality (size) of a set
93func (s *SetStructure) SCard(key string) (int, error) {
94 fs, err := s.checkAndGetSet(key, false)
95 if err != nil {
96 return -1, err
97 }
98 return len(*fs), nil
99}
100
101// SMembers gets all members of a set identified by the provided key.
102// If the set does not exist or the key belongs to a different data type,

Callers

nothing calls this directly

Calls 1

checkAndGetSetMethod · 0.95

Tested by

no test coverage detected