RedisZaddInsertBehavior

public struct RedisZaddInsertBehavior

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

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

However, it other behaviors are available: ZADD Options.

  • Insert new elements and update the score of existing elements.

    Declaration

    Swift

    public static let allElements: RedisZaddInsertBehavior
  • Only insert new elements; do not update the score of existing elements.

    Declaration

    Swift

    public static let onlyNewElements: RedisZaddInsertBehavior
  • Only update the score of existing elements; do not insert new elements.

    Declaration

    Swift

    public static let onlyExistingElements: RedisZaddInsertBehavior