RealmResults

A Realm Result holds the results of querying the Realm.

See also

Properties

Link copied to clipboard
abstract override val size: Int

Functions

Link copied to clipboard
abstract fun asFlow(keyPaths: List<String>? = null): Flow<ResultsChange<T>>

Observe changes to the RealmResult. Once subscribed the flow will emit a InitialResults event and then a UpdatedResults on any change to the objects represented by the query backing the RealmResults. The flow will continue running indefinitely except if the results are from a backlinks property, then they will stop once the target object is deleted.

Link copied to clipboard
abstract operator override fun contains(element: T): Boolean
Link copied to clipboard
abstract override fun containsAll(elements: Collection<T>): Boolean
Link copied to clipboard
inline fun <T : TypedRealmObject> RealmResults<T>.copyFromRealm(depth: UInt = UInt.MAX_VALUE): List<T>

Makes an unmanaged in-memory copy of the elements in a RealmResults. This is a deep copy that will copy all referenced objects.

Link copied to clipboard
abstract operator fun get(index: Int): T
Link copied to clipboard
abstract fun indexOf(element: T): Int
Link copied to clipboard
abstract override fun isEmpty(): Boolean
Link copied to clipboard
abstract operator override fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun lastIndexOf(element: T): Int
Link copied to clipboard
abstract fun listIterator(): ListIterator<T>
abstract fun listIterator(index: Int): ListIterator<T>
Link copied to clipboard
abstract fun query(query: String = TRUE_PREDICATE, vararg args: Any?): RealmQuery<T>

Perform a query on the objects of this result using the Realm Query Language.

Link copied to clipboard
abstract fun subList(fromIndex: Int, toIndex: Int): List<T>
Link copied to clipboard

Instantiates an unmanaged RealmDictionary containing all the elements of this iterable of Pairs of Strings and Ts.

Link copied to clipboard

Instantiates an unmanaged RealmList containing all the elements of this iterable.

Link copied to clipboard

Instantiates an unmanaged RealmSet containing all the elements of this iterable.

Link copied to clipboard
abstract fun version(): VersionId

Returns the Realm version of this object. This version number is tied to the transaction the object was read from.