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

Function cmdZRANK

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

Source from the content-addressed store, hash-verified

239}
240
241func cmdZRANK(m uhaha.Machine, args []string) (interface{}, error) {
242 if len(args) != 3 {
243 return nil, uhaha.ErrWrongNumArgs
244 }
245
246 n, err := ldb.ZRank([]byte(args[1]), []byte(args[2]))
247
248 if err != nil {
249 return nil, err
250 }
251
252 if n == -1 {
253 return nil, nil
254 }
255
256 return redcon.SimpleInt(n), nil
257}
258
259func cmdZCLEAR(m uhaha.Machine, args []string) (interface{}, error) {
260 if len(args) < 2 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected