BinaryRedis.zrangeByScoreWithScores
- Set!(Tuple) zrangeByScoreWithScores(const(ubyte)[] key, double min, double max)
- Set!(Tuple) zrangeByScoreWithScores(const(ubyte)[] key, const(ubyte)[] min, const(ubyte)[] max)
- Set!(Tuple) zrangeByScoreWithScores(const(ubyte)[] key, double min, double max, int offset, int count)
- Set!(Tuple) zrangeByScoreWithScores(const(ubyte)[] key, const(ubyte)[] min, const(ubyte)[] max, int offset, int count)
hunt redis BinaryRedis BinaryRedis
constructorsfunctionsstatic functionsvariables
Return the all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). <p> The elements having the same score are returned sorted lexicographically as ASCII strings (this follows from a property of Redis sorted sets and does not involve further computation). <p> Using the optional {@link #zrangeByScore(const(ubyte)[], double, double, int, int) LIMIT} it's possible to get only a range of the matching elements in an SQL-alike way. Note that if offset is large the commands needs to traverse the list for offset elements and this adds up to the O(M) figure. <p> The {@link #zcount(const(ubyte)[], double, double) ZCOUNT} command is similar to {@link #zrangeByScore(const(ubyte)[], double, double) ZRANGEBYSCORE} but instead of returning the actual elements in the specified interval, it just returns the number of matching elements. <p> <b>Exclusive intervals and infinity</b> <p> min and max can be -inf and +inf, so that you are not required to know what's the greatest or smallest element in order to take, for instance, elements "up to a given value". <p> Also while the interval is for default closed (inclusive) it's possible to specify open intervals prefixing the score with a "(" character, so for instance: <p> {@code ZRANGEBYSCORE zset (1.3 5} <p> Will return all the values with score > 1.3 and <= 5, while for instance: <p> {@code ZRANGEBYSCORE zset (5 (10} <p> Will return all the values with score > 5 and < 10 (5 and 10 excluded). <p> <b>Time complexity:</b> <p> O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements returned by the command, so if M is constant (for instance you always ask for the first ten elements with LIMIT) you can consider it O(log(N)) @see #zrangeByScore(const(ubyte)[], double, double) @see #zrangeByScore(const(ubyte)[], double, double, int, int) @see #zrangeByScoreWithScores(const(ubyte)[], double, double) @see #zrangeByScoreWithScores(const(ubyte)[], double, double, int, int) @see #zcount(const(ubyte)[], double, double) @param key @param min @param max @param offset @param count @return Multi bulk reply specifically a list of elements in the specified score range.