mirror of https://github.com/go-redis/redis.git
readme: Update ZRangeByScore example.
This commit is contained in:
parent
8fd6b4ad9f
commit
b5ff444f91
|
@ -189,7 +189,12 @@ Some corner cases:
|
|||
client.Sort("list", redis.Sort{Offset: 0, Count: 2, Order: "ASC"})
|
||||
|
||||
ZRANGEBYSCORE zset -inf +inf WITHSCORES LIMIT 0 2
|
||||
client.ZRangeByScoreWithScores("zset", "-inf", "+inf", 0, 2)
|
||||
client.ZRangeByScoreWithScores("zset", redis.ZRangeByScore{
|
||||
Min: "-inf",
|
||||
Max: "+inf",
|
||||
Offset: 0,
|
||||
Count: 2,
|
||||
})
|
||||
|
||||
ZINTERSTORE out 2 zset1 zset2 WEIGHTS 2 3 AGGREGATE SUM
|
||||
client.ZInterStore("out", redis.ZStore{Weights: []int64{2, 3}}, "zset1", "zset2")
|
||||
|
|
Loading…
Reference in New Issue