MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / cmdZCARD

Function cmdZCARD

sorted_sets.go:134–145  ·  view source on GitHub ↗
(m uhaha.Machine, args []string)

Source from the content-addressed store, hash-verified

132}
133
134func cmdZCARD(m uhaha.Machine, args []string) (interface{}, error) {
135 if len(args) < 2 {
136 return nil, uhaha.ErrWrongNumArgs
137 }
138
139 n, err := ldb.ZCard([]byte(args[1]))
140 if err != nil {
141 return nil, err
142 }
143
144 return redcon.SimpleInt(n), nil
145}
146
147func cmdZRANGE(m uhaha.Machine, args []string) (interface{}, error) {
148 if len(args) < 4 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected