Description
Implement the LIMIT option on ZRANGE, ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX, and XREVRANGEBYLEX.
The optional LIMIT argument can be used to obtain a sub-range from the matching elements (similar to SELECT LIMIT offset, count in SQL). A negative <count> returns all elements from the <offset>. Keep in mind that if <offset> is large, the sorted set needs to be traversed for <offset>elements before getting to the elements to return, which can add up to O(N) time complexity.
Acceptance Criteria
The LIMIT option has been implemented on the above commands and appropriate unit tests developed. The redis-cli was used to ensure the LIMIT command option works correctly.
Attachments
Issue Links
- Is contained by
-
GEODE-9375 Implement ZRANGE Command
- Closed
-
GEODE-9376 Implement ZREVRANGE Command
- Closed
-
GEODE-9378 Implement ZRANGEBYSCORE Command
- Closed
-
GEODE-9379 Implement ZREVRANGEBYSCORE Command
- Closed
-
GEODE-9388 Implement ZRANGEBYLEX Command
- Closed
-
GEODE-9389 Implement ZREVRANGEBYLEX Command
- Closed