Skip to content

60 -- Provide Strong Option Types in SortedSet Commands

Nathan Harris requested to merge 60-typesafe-sortedset into 47-proposal-feedback

Motivation:

While working through issue #59 (closed), it was noticed just how "stringly" the SortedSet command options for zadd, zinterstore, and zunionstore were, and Swift provides ways of having strong type safety for these options.

Modifications:

  • Add RedisSortedSetAddOption and RedisSortedSetAggregateMethod to replace the String API in zadd, zinterstore, and zunionstore
  • Fix an implication of how overestimatedCountBeingAdded documentation for Array where Element == RESPValue for add(contentsOf:overestimatedCountBeingAdded:_:)

Result:

Users should have a more discoverable and straightforward way that isn't error prone for calling zadd, zinterstore, and zunionstore with Redis supported options.

Closes #60 (closed)

Merge request reports