New-SortedSetStartsWith-Condition by ArnoKoll · Pull Request #2638 · StackExchange/StackExchange.Redis (original) (raw)

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'.