Package io.realm.kotlin.query

Types

RealmElementQuery
Link copied to clipboard
interface RealmElementQuery<T : BaseRealmObject> : Deleteable
Query returning RealmResults.
RealmQuery
Link copied to clipboard
interface RealmQuery<T : BaseRealmObject> : RealmElementQuery<T>
A RealmQuery encapsulates a query on a Realm, a RealmResults or a RealmList instance using the Builder pattern.
RealmResults
Link copied to clipboard
interface RealmResults<T : BaseRealmObject> : List<T> , Deleteable, Versioned
A Realm Result holds the results of querying the Realm.
RealmScalarNullableQuery
Link copied to clipboard
interface RealmScalarNullableQuery<T> : RealmScalarQuery<T?>
Queries that return scalar, nullable values.
RealmScalarQuery
Link copied to clipboard
interface RealmScalarQuery<T>
Queries that return scalar values.
RealmSingleQuery
Link copied to clipboard
interface RealmSingleQuery<T : BaseRealmObject> : Deleteable
Query returning a single RealmObject or EmbeddedRealmObject.
Sort
Link copied to clipboard
enum Sort : Enum<Sort>
This enum describes the sorting order used in Realm queries.

Functions

find
Link copied to clipboard
fun <T : BaseRealmObject, R> RealmQuery<T>.find(block: (RealmResults<T>) -> R): R
Similar to RealmQuery.find but it receives a block in which the RealmResults from the query are provided.
fun <T, R> RealmScalarNullableQuery<T>.find(block: (T?) -> R): R
Similar to RealmScalarNullableQuery.find but it receives a block in which the scalar result from the query is provided.
fun <T, R> RealmScalarQuery<T>.find(block: (T) -> R): R
Similar to RealmScalarQuery.find but it receives a block in which the scalar result from the query is provided.
fun <T : BaseRealmObject, R> RealmSingleQuery<T>.find(block: (T?) -> R): R
Similar to RealmSingleQuery.find but it receives a block in which the RealmObject or EmbeddedRealmObject from the query is provided.
max
Link copied to clipboard
inline fun <T : Any> RealmQuery<*>.max(property: String): RealmScalarNullableQuery<T>
Similar to RealmQuery.max but the type parameter is automatically inferred.
min
Link copied to clipboard
inline fun <T : Any> RealmQuery<*>.min(property: String): RealmScalarNullableQuery<T>
Similar to RealmQuery.min but the type parameter is automatically inferred.
sum
Link copied to clipboard
inline fun <T : Any> RealmQuery<*>.sum(property: String): RealmScalarQuery<T>
Similar to RealmQuery.sum but the type parameter is automatically inferred.

Properties

TRUE_PREDICATE
Link copied to clipboard
const val TRUE_PREDICATE: String
A query filter predicate string that will be true for all objects, hence will make the query select all objects.