Enumerations

The following enumerations are available globally.

  • The supported insert behavior for a zadd command with Redis SortedSet types.

    zadd normally inserts all elements (.allElements) provided into the SortedSet, updating the score of any element that already exist in the set.

    However, it supports two other insert behaviors:

    • .onlyNewElements will not update the score of any element already in the SortedSet
    • .onlyExistingElements will not insert any new element into the SortedSet

    See https://redis.io/commands/zadd#zadd-options-redis-302-or-greater

    See more

    Declaration

    Swift

    public enum RedisZaddInsertBehavior
  • The supported behavior for what a zadd command return value should represent.

    zadd normally returns the number of new elements inserted into the set (.insertedElementsCount), but also supports the option (.changedElementsCount) to return the number of elements changed as a result of the command.

    “Changed” in this context refers to both new elements that were inserted and existing elements that had their score updated.

    See https://redis.io/commands/zadd

    See more

    Declaration

    Swift

    public enum RedisZaddReturnBehavior
  • Represents a range bound for use with the Redis SortedSet commands related to element scores.

    This type conforms to ExpressibleByFloatLiteral and ExpressibleByIntegerLiteral, which will initialize to an .inclusive bound.

    For example:

    let literalBound: RedisZScoreBound = 3 // .inclusive(3)
    let otherLiteralBound: RedisZScoreBound = 3.0 // .inclusive(3)
    let exclusiveBound = RedisZScoreBound.exclusive(4)
    
    See more

    Declaration

    Swift

    public enum RedisZScoreBound
    extension RedisZScoreBound: CustomStringConvertible
    extension RedisZScoreBound: ExpressibleByFloatLiteral
    extension RedisZScoreBound: ExpressibleByIntegerLiteral
  • Represents a range bound for use with the Redis SortedSet lexiographical commands to compare values.

    Cases must be explicitly declared, with wrapped values conforming to CustomStringConvertible.

    The cases .negativeInfinity and .positiveInfinity represent the special characters in Redis of - and + respectively. These are constants for absolute lower and upper value bounds that are always treated as inclusive.

    See https://redis.io/commands/zrangebylex#details-on-strings-comparison

    See more

    Declaration

    Swift

    public enum RedisZLexBound<Value> where Value : CustomStringConvertible
    extension RedisZLexBound: CustomStringConvertible
  • The result of a SET command.

    See more

    Declaration

    Swift

    public enum RedisSetCommandResult : Hashable
  • A representation of a Redis Serialization Protocol (RESP) primitive value.

    This enum representation should be used only as a temporary intermediate representation of values, and should be sent to a Redis server or converted to Swift types as soon as possible.

    Redis servers expect a single message packed into an .array, with all elements being .bulkString representations of values. As such, all initializers convert to .bulkString representations, as well as default conformances for RESPValueConvertible.

    Each case of this type is a different listing in the RESP specification, and several computed properties are available to consistently convert values into Swift types.

    See: https://redis.io/topics/protocol

    See more

    Declaration

    Swift

    public enum RESPValue
    extension RESPValue: CustomStringConvertible
    extension RESPValue: Equatable
    extension RESPValue: RESPValueConvertible