Package io.realm

Core functions and types.

Types

BaseRealm
Link copied to clipboard
common
interface BaseRealm : Versioned
Base class for all Realm instances (Realm and MutableRealm).
LogConfiguration
Link copied to clipboard
common
data class LogConfiguration(level: LogLevel, loggers: List<RealmLogger>)
Configuration for log events created by a Realm instance.
MutableRealm
Link copied to clipboard
common
interface MutableRealm : TypedRealm
Represents the writeable state of a Realm file.
Queryable
Link copied to clipboard
common
interface Queryable<T : RealmObject>
Interface holding common query methods.
Realm
Link copied to clipboard
common
interface Realm : TypedRealm
A Realm instance is the main entry point for interacting with a persisted Realm.
RealmConfiguration
Link copied to clipboard
common
interface RealmConfiguration
A Realm Configuration defining specific setup and configuration for a Realm instance.
RealmList
Link copied to clipboard
common
interface RealmList<E> : MutableList<E>
RealmList is used to model one-to-many relationships in a RealmObject.
RealmObject
Link copied to clipboard
common
interface RealmObject
Marker interface to define a model (managed by Realm).
RealmResults
Link copied to clipboard
common
interface RealmResults<T : RealmObject> : List<T> , Queryable<T> , Versioned
A Realm Result holds the results of querying the Realm.
TypedRealm
Link copied to clipboard
common
interface TypedRealm : BaseRealm
A typed realm that can be queried for objects of a specific type.
Versioned
Link copied to clipboard
common
interface Versioned
VersionId
Link copied to clipboard
common
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
common
fun RealmObject.delete()
Deletes the RealmObject.
isFrozen
Link copied to clipboard
common
fun RealmObject.isFrozen(): Boolean
Returns whether the object is frozen or not.
isManaged
Link copied to clipboard
common
fun RealmObject.isManaged(): Boolean
Returns whether or not this object is managed by Realm.
isValid
Link copied to clipboard
common
fun RealmObject.isValid(): Boolean
Returns true if this object is still valid to use, i.e.
objects
Link copied to clipboard
common
inline fun <T : RealmObject> TypedRealm.objects(): RealmResults<T>
Returns the results of querying for all objects of a specific type.
observe
Link copied to clipboard
common
fun <T : RealmObject> T.observe(): Flow<T>
Observe changes to a Realm object.
realmListOf
Link copied to clipboard
common
fun <T> realmListOf(vararg elements: T): RealmList<T>
Instantiates an unmanagedRealmList.
toRealmList
Link copied to clipboard
common
fun <T> Iterable<T>.toRealmList(): RealmList<T>
Instantiates an unmanagedRealmList containing all the elements of this iterable.
version
Link copied to clipboard
common
fun RealmObject.version(): VersionId
Returns the Realm version of this object.