StackExchange / StackExchange.Redis

General purpose redis client
https://stackexchange.github.io/StackExchange.Redis/
Other
5.85k stars 1.5k forks source link

New-SortedSetStartsWith-Condition #2638

Open ArnoKoll opened 5 months ago

ArnoKoll commented 5 months ago

This adds two new condition-types 'SortedSetStartsWith' and 'SortedSetNotStartWith' to the AddCondition-command of a transaction.

The parameters are 'Key' and 'StartValue', where 'StartValue' is a byte array. The byte array avoids encoding, that could distort a comparison, within StackExchange.Redis.

SortedSetStartsWith-condition discards a transaction if there is not at least one member within a sorted set, that starts with the 'StartValue'.

SortedSetNotStartsWith-condition discards a transaction if there is at least one member within a sorted set, that starts with the 'StartValue'.