Skip to content

RediStack 1.0.0 Alpha 8

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mordil Mordil released this 12 Mar 04:19
· 125 commits to master since this release
b08ad54

API Docs are always available at docs.redistack.info

Major

  • All commands that require a String key is now a type-safe representation called RedisKey !93
    • It conforms to: Hashable, RESPValueConvertible, Codable, Comparable, Equatable, ExpressibleByStringLiteral and RawRepresentable
    • RESPValue now has an init overload for RedisKey
  • The RedisClient protocol now has an isConnected: Bool readonly property requirement !95
  • All timeout related command parameters now use the NIO.TimeAmount type, rather than Int !96
  • The zadd command API has been reworked to be more expressive and type-safe !97
    • RedisSortedSetAddOption is now RedisZaddInsertBehavior
    • RedisZaddReturnBehavior has been added, instead of a Boolean parameter
      let client = ...
      client.zadd(
        (element, 3),
        to: "my_sorted_set",
        inserting: .onlyNewElements,
        returning: .insertedElementsCount
      )
  • The range command APIs for SortedSet and List types in Redis have been reworked to be more expressive with the Swift range syntax !98
    • The range based APIs also have been changed to be type-safe instead of the old String based API with the RedisZLexBound and RedisZScoreBound enums
      let client = ...
      client.lrange(from: "my_list", indices: 3...5)
  • EventLoopFuture.convertFromRESPValue has been renamed to be an overload of map !104

Minor

  • Added the authorize command method to RedisClient !94
  • Collection of RESPValue now have several map overloads to convert the RESPValue to other types that are RESPValueConvertible !103

Patch

  • Updated SwiftMetrics version to be 1.0.0 ..< 3.0.0 (973a9162)