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> asQuery(type: KClass<T>): <ERROR CLASS><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: <ERROR CLASS>

The timestamp for when this subscription was created.

id
Link copied to clipboard
abstract val id: <ERROR CLASS>

An unique id, generated by Realm, that identifies this subscription.

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: <ERROR CLASS>

The timestamp for when a persisted subscription was updated. When the subscription is created, this field is equal to createdAt.

Extensions

asQuery
Link copied to clipboard
inline fun <T> Subscription.asQuery(): <ERROR CLASS><T>

Converts the Subscription.queryDescription back to a RealmQuery that can be executed against the local Realm.