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

Function cmdZREVRANK

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

Source from the content-addressed store, hash-verified

346 return nil, err
347 }
348
349 return redcon.SimpleInt(n), nil
350}
351
352func cmdZREVRANK(m uhaha.Machine, args []string) (interface{}, error) {
353 if len(args) != 3 {
354 return nil, uhaha.ErrWrongNumArgs
355 }
356
357 n, err := ldb.ZRevRank([]byte(args[1]), []byte(args[2]))
358 if err != nil {
359 return nil, err
360 }
361
362 if n == -1 {
363 return nil, nil
364 }
365
366 return redcon.SimpleInt(n), nil

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected