initialSubscriptions

fun initialSubscriptions(rerunOnOpen: Boolean = false, initialSubscriptionBlock: InitialSubscriptionsCallback): SyncConfiguration.Builder

Define the initial io.realm.mongodb.sync.SubscriptionSet for the Realm. This will only be executed the first time the Realm file is opened (and the file created).

If waitForInitialRemoteData is configured as well, the realm file isn't fully opened until all subscription data also has been downloaded.

Parameters

rerunOnOpen

If true this closure will rerun every time the Realm is opened, this makes it possible to update subscription queries with e.g. new timestamp information or other query data that might change over time. If waitForInitialRemoteData is also set, the Realm will download the new subscription data every time the Realm is opened, rather than just the first time.

initialSubscriptionBlock

closure making it possible to modify the set of subscriptions.