Refactor RedisCommand into a general use object
RediStack today represents a command as a temporary object for the purpose of writing to the channel.
While it is useful to have an object for that purpose, commands handled in this way require immediate execution and aren't available for other purposes.
Commands can serve a better purpose as a lightweight object to support delayed execution, so that pipeling as described in issue #63 could be possible.
getoverloads for JSON codable interaction on
- Add: New
RedisZRangeResultOptiontype for better interactions with zrange operations that can optionally return scores
- Add: New
RedisHashFieldKeyfor type-safety when working with Hash field keys much like
- Change: A few API types from enums to structs for library evolution
RedisCommandHandlerto operate on a tuple of
RESPValue, EventLoopPromise<RESPValue>rather than
RedisCommandto be a generic struct with the keyword, arguments, and a transform closure to defer execution
- Change: Almost all
RedisClientcommand extensions to be factory methods on
- Change: Many response types to be optional to avoid developers having to do
isNullchecks on their own
RedisClient.send(command:arguments:)to be generic with
send(_:)as the signature
- Rename: RedisClient extensions for scan methods to be more discoverable and legible as
It should be easier to support a clean pipelining API with deferred command execution, with extensions being easier for 2nd party developers, and the maintenance overhead of all of the command extensions should be a little lighter when it comes to changing HOW commands are sent such as adding a context parameter