Package io.realm

Core functions and types.

Types

BaseRealm
Link copied to clipboard
interface BaseRealm : Versioned
Base class for all Realm instances (Realm and MutableRealm).
Configuration
Link copied to clipboard
interface Configuration
LogConfiguration
Link copied to clipboard
data class LogConfiguration(level: LogLevel, loggers: List<RealmLogger>)
Configuration for log events created by a Realm instance.
MutableRealm
Link copied to clipboard
interface MutableRealm : TypedRealm
Represents the writeable state of a Realm file.
Queryable
Link copied to clipboard
interface Queryable<T : RealmObject>
Interface holding common query methods.
Realm
Link copied to clipboard
interface Realm : TypedRealm
A Realm instance is the main entry point for interacting with a persisted realm.
RealmConfiguration
Link copied to clipboard
interface RealmConfiguration : Configuration
A Realm Configuration defining specific setup and configuration for a Realm instance.
RealmInstant
Link copied to clipboard
interface RealmInstant : Comparable<RealmInstant>
A representation of a Realm timestamp.
RealmList
Link copied to clipboard
interface RealmList<E> : MutableList<E> , Flowable<RealmList<E>>
RealmList is used to model one-to-many relationships in a RealmObject.
RealmObject
Link copied to clipboard
interface RealmObject
Marker interface to define a model (managed by Realm).
RealmResults
Link copied to clipboard
interface RealmResults<T : RealmObject> : List<T> , Queryable<T> , Flowable<RealmResults<T>> , Versioned
A Realm Result holds the results of querying the Realm.
TypedRealm
Link copied to clipboard
interface TypedRealm : BaseRealm
A typed realm that can be queried for objects of a specific type.
Versioned
Link copied to clipboard
interface Versioned
VersionId
Link copied to clipboard
data class VersionId(version: Long) : Comparable<VersionId>
A VersionId representing the transactional id of the Realm itself or it's objects.

Functions

delete
Link copied to clipboard
fun RealmObject.delete()
Deletes the RealmObject.
isFrozen
Link copied to clipboard
fun RealmObject.isFrozen(): Boolean
Returns whether the object is frozen or not.
isManaged
Link copied to clipboard
fun RealmObject.isManaged(): Boolean
Returns whether or not this object is managed by Realm.
isValid
Link copied to clipboard
fun RealmObject.isValid(): Boolean
Returns true if this object is still valid to use, i.e.
observe
Link copied to clipboard
fun <T : RealmObject> T.observe(): Flow<T>
Observe changes to a Realm object.
query
Link copied to clipboard
inline fun <T : RealmObject> MutableRealm.query(query: String = "TRUEPREDICATE", vararg args: Any?): RealmQuery<T>
Returns a RealmQuery matching the predicate represented by query.
inline fun <T : RealmObject> Realm.query(query: String = "TRUEPREDICATE", vararg args: Any?): RealmQuery<T>
Returns a RealmQuery matching the predicate represented by query.
inline fun <T : RealmObject> TypedRealm.query(query: String = "TRUEPREDICATE", vararg args: Any?): RealmQuery<T>
Returns a RealmQuery matching the predicate represented by query.
realmListOf
Link copied to clipboard
fun <T> realmListOf(vararg elements: T): RealmList<T>
Instantiates an unmanagedRealmList.
toRealmList
Link copied to clipboard
fun <T> Iterable<T>.toRealmList(): RealmList<T>
Instantiates an unmanagedRealmList containing all the elements of this iterable.
version
Link copied to clipboard
fun RealmObject.version(): VersionId
Returns the Realm version of this object.