If state
is SubscriptionSetState.Error, this will be a string representing
why the SubscriptionSet is in an error state. It will be null
if there is no error.
A string representing the error, or null
if there is no error.
Whether there are no subscriptions in the set.
true
if there are no subscriptions in the set, false
otherwise.
The number of subscriptions in the set.
The state of the SubscriptionSet.
The version of the SubscriptionSet. This is incremented every time a SubscriptionSet.update is applied.
The version of the SubscriptionSet.
Makes the subscription set iterable.
Iterable of each value in the set.
for (const subscription of subscriptions) {
// ...
}
Add a query to the set of active subscriptions. The query will be joined via
an OR
operator with any existing queries for the same type.
A query is represented by a Results instance returned from Realm.objects,
for example: mutableSubs.add(realm.objects("Cat").filtered("age > 10"));
.
A Results instance representing the query to subscribe to.
Optional
options: SubscriptionOptionsAn optional SubscriptionOptions object containing options to use when adding this subscription (e.g. to give the subscription a name).
A Subscription
instance for the new subscription.
Find a subscription by name.
The name to search for.
The named subscription, or null
if the subscription is not found.
Find a subscription by query. Will match both named and unnamed subscriptions.
The query to search for, represented as a Results instance,
e.g. Realm.objects("Cat").filtered("age > 10")
.
The subscription with the specified query, or null
if the subscription is not found.
Remove a subscription with the given query from the SubscriptionSet.
A Results instance representing the query to remove a subscription to.
true
if the subscription was removed, false
if it was not found.
Remove the specified subscription from the SubscriptionSet.
The Subscription instance to remove.
true
if the subscription was removed, false
if it was not found.
Generated using TypeDoc
The mutable version of a given SubscriptionSet. The MutableSubscriptionSet instance can only be used from inside the SubscriptionSet.update callback.