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

Function cmdZSCORE

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

Source from the content-addressed store, hash-verified

315}
316
317func cmdZSCORE(m uhaha.Machine, args []string) (interface{}, error) {
318 if len(args) != 3 {
319 return nil, uhaha.ErrWrongNumArgs
320 }
321
322 n, err := ldb.ZScore([]byte(args[1]), []byte(args[2]))
323 if err != nil {
324 if err == ledis.ErrScoreMiss {
325 return nil, nil
326 }
327 return nil, err
328 }
329
330 // Redis replies with a bulk string here, not an integer reply.
331 return []byte(strconv.FormatInt(n, 10)), nil

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected