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.
-
Do not filter anything. Affect all children.
Declaration
Swift
case all
-
Affect only the first
limit
children. Thelimit
must be strictly positive or it will be ignored.Declaration
Swift
case first(limit: Int)
-
Affect only the last
limit
children. Thelimit
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, whenlimit
is a non-nil
strictly positive integer, only the firstlimit
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, whenlimit
is a non-nil
strictly positive integer, only the lastlimit
children respecting the order are affected.Declaration
Swift
case endAt(key: WebcomKey, limit: Int? = nil)
-
Declaration
Swift
public var description: String { get }