query

abstract fun <T : RealmObject> query(clazz: KClass<T>, query: String = "TRUEPREDICATE", vararg args: Any?): RealmQuery<T>

Returns a RealmQuery matching the predicate represented by query.

For a Realm instance this reflects the state of the Realm at the invocation time, this the results obtained from the query will not change on updates to the Realm. For a MutableRealm the query will produce live results and will in fact reflect updates to the MutableRealm.

Parameters

query

the Realm Query Language predicate to append.

args

Realm values for the predicate.