WaitForSync

Enum defining the behaviour of when RealmQuery.subscribe and RealmResults.subscribe will return a query result.

When the Subscription is created for the first time, data needs to be downloaded from the server before it becomes available, so depending on whether you run the query against the local database before or after this has happened, you query results might not look correct.

This enum thus defines the behaviour of when the query is run, so it possible to make the appropriate tradeoff between correctness and availability.

See also

Entries

Link copied to clipboard

This mode will wait for the server data the first time a subscription is created before running the local query. Later calls to io.realm.kotlin.mongodb.ext.subscribe will detect that the subscription already exist and run the query immediately.

Link copied to clipboard

With this mode enabled, Realm will always download the latest server state before running the local query. This means that your query result is always seeing the latest data, but it also requires the app to be online.

Link copied to clipboard

With this mode enabled, Realm will always query the local database first while any server data is being downloaded in the background. This update is not binary, which means that if you register a flow on the query result, you might see multiple events being emitted as the database is being filled based on the subscription.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.