Subscription

interface Subscription

A subscription defines a specific server query and its metadata. The result of this query is continuously being synchronized with the device as long as the subscription is part of a SubscriptionSet with a state of SubscriptionSetState.COMPLETE.

Subscriptions can be updated using MutableSubscriptionSet.add with updateExisting = true.

Functions

asQuery
Link copied to clipboard
abstract fun <T : RealmObject> asQuery(type: KClass<T>): RealmQuery<T>
Converts the Subscription.queryDescription back to a RealmQuery that can be executed against the local Realm.

Properties

createdAt
Link copied to clipboard
abstract val createdAt: RealmInstant
The timestamp for when this subscription was created.
name
Link copied to clipboard
abstract val name: String?
The name of subscription or null if this is an anonymous subscription.
objectType
Link copied to clipboard
abstract val objectType: String
The class name of the objects being queried.
queryDescription
Link copied to clipboard
abstract val queryDescription: String
The subscription query that is running on objects of type objectType.
updatedAt
Link copied to clipboard
abstract val updatedAt: RealmInstant
The timestamp for when a persisted subscription was updated.

Extensions

asQuery
Link copied to clipboard
inline fun <T : RealmObject> Subscription.asQuery(): RealmQuery<T>
Converts the Subscription.queryDescription back to a RealmQuery that can be executed against the local Realm.