asPagingItems
Returns Flow<PagingData<T>
with results that match the io.realm.RealmQuery produced by the builder.
Note: By default, the implementation copies the entire RealmModel object to memory using RealmCopyTransform. To read a subset of data per RealmModel consider using asPagingItems overload which tasks a RealmModelTransform function.
The flow can be further transformed using paging operators and cached using flow.cachedIn(viewModelScope)
in Android ViewModel
.
See also
Returns Flow<PagingData<T>
with results that match the io.realm.RealmQuery produced by the builder.
The flow can be further transformed using paging operators and cached using flow.cachedIn(viewModelScope)
in Android ViewModel
. Note: Thread safety depends on the transform function implementation. Typically the implementation should return unmanaged objects that can be safely passed around threads. For a reference implementation see RealmCopyTransform. As a good practice only read the relevant properties from RealmModel to reduce the amount of objects load into application memory. If managed objects are returned for any reason, no thread safety is guaranteed.