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

Function cmdZCOUNT

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

Source from the content-addressed store, hash-verified

114}
115
116func cmdZCOUNT(m uhaha.Machine, args []string) (interface{}, error) {
117 if len(args) != 4 {
118 return nil, uhaha.ErrWrongNumArgs
119 }
120
121 min, max, err := zparseScoreRange([]byte(args[2]), []byte(args[3]))
122 if err != nil {
123 return nil, err
124 }
125
126 count, err := ldb.ZCount([]byte(args[1]), int64(min), int64(max))
127 if err != nil {
128 return nil, err
129 }
130
131 return count, nil
132}
133
134func cmdZCARD(m uhaha.Machine, args []string) (interface{}, error) {
135 if len(args) < 2 {

Callers

nothing calls this directly

Calls 1

zparseScoreRangeFunction · 0.85

Tested by

no test coverage detected