X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/efc296a1d6068f4e0cde584415d4c14a963c175c..49128f0b9da725de992e427fa341a837bcc2991b:/doc/ZrangeCommand.html diff --git a/doc/ZrangeCommand.html b/doc/ZrangeCommand.html new file mode 100644 index 00000000..e453d36c --- /dev/null +++ b/doc/ZrangeCommand.html @@ -0,0 +1,42 @@ + + + +
+ + + +Return the specified elements of the sorted set at the specifiedkey. The elements are considered sorted from the lowerest to the highestscore when using ZRANGE, and in the reverse order when using ZREVRANGE.Start and end are zero-based indexes. 0 is the first elementof the sorted set (the one with the lowerest score when using ZRANGE), 1the next element by score and so on.+
_start_ and end can also be negative numbers indicating offsetsfrom the end of the sorted set. For example -1 is the last element ofthe sorted set, -2 the penultimate element and so on.+
Indexes out of range will not produce an error: if start is overthe end of the sorted set, or start >
end, an empty list is returned.If end is over the end of the sorted set Redis will threat it just likethe last element of the sorted set.
+It's possible to pass the WITHSCORES option to the command in order to return notonly the values but also the scores of the elements. Redis will return the dataas a single list composed of value1,score1,value2,score2,...,valueN,scoreN but clientlibraries are free to return a more appropriate data type (what we think is thatthe best return type for this command is a Array of two-elements Array / Tuple inorder to preserve sorting).+