QuerySubscription

@frozen
public struct QuerySubscription<T> where T : RealmSwiftObject

SubscriptionQuery is used to define an named/unnamed query subscription query, which can be added/remove or updated within a write subscription transaction.

Internal

  • Creates a QuerySubscription for the given type.

    Declaration

    Swift

    public init(name: String? = nil, query: @escaping QueryFunction)

    Parameters

    name

    Name of the subscription.

    query

    The query for the subscription.

  • Creates a QuerySubscription for the given type.

    Declaration

    Swift

    public init(name: String? = nil, where predicateFormat: String, _ args: Any...)

    Parameters

    name

    Name of the subscription.

    predicateFormat

    A predicate format string, optionally followed by a variable number of arguments, which will be used to create the subscription.

  • Creates a QuerySubscription for the given type.

    Declaration

    Swift

    public init(name: String? = nil, where predicate: NSPredicate)

    Parameters

    name

    Name of the subscription.

    predicate

    The predicate defining the query used to filter the objects on the server..