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

Function cmdZREMRANGEBYRANK

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

Source from the content-addressed store, hash-verified

523 return nil, nil
524 }
525
526 return redcon.SimpleInt(n), nil
527}
528
529func cmdZREMRANGEBYRANK(m uhaha.Machine, args []string) (interface{}, error) {
530 if len(args) != 4 {
531 return nil, uhaha.ErrWrongNumArgs
532 }
533
534 start, err := strconv.Atoi(args[2])
535 if err != nil {
536 return nil, err
537 }
538
539 stop, err := strconv.Atoi(args[3])
540 if err != nil {
541 return nil, err
542 }
543
544 n, err := ldb.ZRemRangeByRank([]byte(args[1]), start, stop)
545 if err != nil {
546 return nil, err
547 }
548
549 return redcon.SimpleInt(n), nil

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected