jedis
jedis copied to clipboard
Implement exclusive range intervals for XRANGE
Jedis doesn't seem to support the exclusive range intervals feature added in Redis 6.2 for the XRANGE
command:
The range is close (inclusive) by default, meaning that the reply can include entries with IDs matching the query's start and end intervals. It is possible to specify an open interval (exclusive) by prefixing the ID with the character
(
Implement this using a new invocation of XRANGE
or add it to StreamEntryID
and have the XRANGE
code look for it in the IDs passed?
@simonprickett This is available since Jedis 4.0 by
List<StreamEntry> xrange(String key, String start, String end);
List<StreamEntry> xrange(String key, String start, String end, int count);
where users are expected to do '(' + id.toString()
for start and end.
This is nothing fancy but at least similar to ZRANGE.
Thanks - we subsequently realized this, I feel a more idiomatic / explicit approach would be a nice to have though.
This issue is marked stale. It will be closed in 30 days if it is not updated.