Revisit the SortedSet `zadd` command API
Motivation:
While reviewing the API, the current design does not read well, and still has room for misunderstanding the actual end result of a ZADD operation.
Modifications:
- Rename
RedisSortedSetAddOption
toRedisZaddInsertBehavior
and update cases to match desired use site syntax. - Add
RedisZaddReturnBehavior
enum to define howzadd
should calculate the return value. - Update
zadd
and its overloads to support the two new enums in the form ofzadd(_:to:inserting:returning:)
Result:
The more "Swifty" API will make it much more clear to developers at the call site what the actual behavior of the ZADD command will be.