SCard Returns the set cardinality (number of elements) of the set stored at key.
(key string)
| 107 | |
| 108 | // SCard Returns the set cardinality (number of elements) of the set stored at key. |
| 109 | func (s *Set) SCard(key string) int { |
| 110 | if !s.SHasKey(key) { |
| 111 | return 0 |
| 112 | } |
| 113 | |
| 114 | return len(s.M[key]) |
| 115 | } |
| 116 | |
| 117 | // SDiff Returns the members of the set resulting from the difference between the first set and all the successive sets. |
| 118 | func (s *Set) SDiff(key1, key2 string) ([]*core.Record, error) { |