Adding ZRangeStore by slorello89 · Pull Request #2052 · StackExchange/StackExchange.Redis (original) (raw)

Adds ZRangeStore for #2047

APIs added:

Rather than funneling everything through a single method, I left the interface to be reflective of the current ZRange interface in IDatabase/IDatabaseAsync.

Added a new Message type:

SortedSetRangeAndStoreCommandMessage to handle the ZRANGESTORE as it didn't quite fit any of the other message types. I left this in RedisDatabase.cs as this follows the pattern of SortedSetCombineAndStoreCommandMessage, if you'd like to evict it to somewhere else I've no issue doing that.

API Quirks

ZRANGESTORE with the REV flag is a bit odd, all it effectively does is reverse the ordering of the start/stop arguments, basically if REV is set start must be greater than stop, I did not add any sort of smarts to effect this reversal by default as again this would not be the expected behavior of the older APIs, happy to effect the swap if you think that API would be more desirous.