DatasyncChildrenConstraint

public enum DatasyncChildrenConstraint : Equatable, CustomStringConvertible

A value to filter the children affected by a node subscription.

This type is used by the DatasyncNode.subscribe(to:childrenConstraint:stores:file:line:queue:onEvent:onCompletion:) method.

The children constraint defines a kind of visibility window. For the subscription to which it is applied, children that enter in the window are seen as if they were added, and children that leave the window are seen as if they were removed.

Cases

  • all

    Do not filter anything. Affect all children.

    Declaration

    Swift

    case all
  • Affect only the first limit children. The limit must be strictly positive or it will be ignored.

    Declaration

    Swift

    case first(limit: Int)
  • Affect only the last limit children. The limit must be strictly positive or it will be ignored.

    Declaration

    Swift

    case last(limit: Int)
  • Affect only the children whose keys are equal to or after key. Moreover, when limit is a non-nil strictly positive integer, only the first limit children respecting the order are affected.

    Declaration

    Swift

    case startAt(key: WebcomKey, limit: Int? = nil)
  • Affect only the children whose keys are equal to or before key. Moreover, when limit is a non-nil strictly positive integer, only the last limit children respecting the order are affected.

    Declaration

    Swift

    case endAt(key: WebcomKey, limit: Int? = nil)
  • Affect only the children whose keys are equal to or after startKey and are equal to or before endKey.

    Declaration

    Swift

    case between(startKey: WebcomKey, endKey: WebcomKey)

CustomStringConvertible Protocol

  • Declaration

    Swift

    public var description: String { get }