MCPcopy
hub / github.com/redis/go-redis / zRangeBy

Method zRangeBy

sortedset_commands.go:481–497  ·  view source on GitHub ↗
(ctx context.Context, zcmd, key string, opt *ZRangeBy, withScores bool)

Source from the content-addressed store, hash-verified

479}
480
481func (c cmdable) zRangeBy(ctx context.Context, zcmd, key string, opt *ZRangeBy, withScores bool) *StringSliceCmd {
482 args := []interface{}{zcmd, key, opt.Min, opt.Max}
483 if withScores {
484 args = append(args, "withscores")
485 }
486 if opt.Offset != 0 || opt.Count != 0 {
487 args = append(
488 args,
489 "limit",
490 opt.Offset,
491 opt.Count,
492 )
493 }
494 cmd := NewStringSliceCmd(ctx, args...)
495 _ = c(ctx, cmd)
496 return cmd
497}
498
499// ZRangeByScore returns members in a sorted set within a range of scores.
500//

Callers 2

ZRangeByScoreMethod · 0.95
ZRangeByLexMethod · 0.95

Calls 1

NewStringSliceCmdFunction · 0.85

Tested by

no test coverage detected