RedisZaddReturnBehavior

public struct RedisZaddReturnBehavior

The supported behavior for what a zadd command return value should represent.

zadd normally returns the number of new elements inserted into the set, but also supports the option 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 ZADD Options

  • Count both new elements that were inserted into the SortedSet and existing elements that had their score updated.

    Declaration

    Swift

    public static let changedElementsCount: RedisZaddReturnBehavior
  • Count only new elements that were inserted into the SortedSet.

    Declaration

    Swift

    public static let insertedElementsCount: RedisZaddReturnBehavior