query

abstract override fun <T : BaseRealmObject> query(clazz: KClass<T>, query: String, vararg args: Any?): RealmQuery<T>

Returns a RealmQuery matching the predicate represented by query.

The results yielded by the query are live and thus also reflect any update to the MutableRealm. Said results are only valid on the calling thread.

It is not allowed to call RealmQuery.asFlow on queries generated from a MutableRealm.

The resulting query is lazily evaluated and will not perform any calculations until RealmQuery.find is called.

Parameters

query

the Realm Query Language predicate to append.

args

Realm values for the predicate.