RealmSingleQuery

interface RealmSingleQuery<T> : Flowable<T>

Query returning a single RealmObject.

Functions

asFlow
Link copied to clipboard
abstract override fun asFlow(): Flow<T?>
Finds the first object that fulfills the query conditions and returns it asynchronously as a Flow.
find
Link copied to clipboard
abstract fun find(): T?
Finds the first object that fulfills the query conditions and returns it in a blocking fashion.

Extensions

find
Link copied to clipboard
fun <T, R> RealmSingleQuery<T>.find(block: (T?) -> R): R
Similar to RealmSingleQuery.find but it receives a block in which the RealmObject from the query is provided.