Package-level declarations

Properties

Link copied to clipboard

Create a Distance object from degrees.

Link copied to clipboard

Create a Distance object from kilometers. (mention equatorial distance)

Link copied to clipboard

Create a Distance object from miles. (mention equatorial distance)

Link copied to clipboard

Create a Distance object from radians.

Functions

Link copied to clipboard
fun ObjectId.asBsonObjectId(): BsonObjectId
Link copied to clipboard
fun <T : BaseRealmObject> T.asFlow(keyPaths: List<String>? = null): Flow<ObjectChange<T>>

Observe changes to a Realm object. The flow would emit an InitialObject once subscribed and then, on every change to the object an UpdatedObject. If the observed object is deleted from the Realm, the flow would emit a DeletedObject and then will complete, otherwise it will continue running until canceled.

Link copied to clipboard

Creates an unmanaged RealmAny instance from a BaseRealmObject value.

Link copied to clipboard

Returns a BacklinksDelegate that represents the inverse relationship between two an EmbeddedRealmObject and a TypedRealmObject.

inline fun <T : TypedRealmObject> RealmObject.backlinks(sourceProperty: KProperty1<T, *>): BacklinksDelegate<T>

Returns a BacklinksDelegate that represents the inverse relationship between two Realm models.

Defines a backlink that represents a one-to-one inverse relationship between an EmbeddedRealmObject and a TypedRealmObject.

fun <T : TypedRealmObject> RealmObject.backlinks(sourceProperty: KProperty1<T, *>, sourceClass: KClass<T>): BacklinksDelegate<T>

Defines a collection of backlinks that represents the inverse relationship between two Realm models. Any direct relationship, one-to-one or one-to-many, can be reversed by backlinks.

Link copied to clipboard
inline fun <T : TypedRealmObject> T.copyFromRealm(depth: UInt = UInt.MAX_VALUE): T

Makes an unmanaged in-memory copy of an already persisted io.realm.kotlin.types.RealmObject. This is a deep copy that will copy all referenced objects.

inline fun <T : TypedRealmObject> RealmResults<T>.copyFromRealm(depth: UInt = UInt.MAX_VALUE): List<T>

Makes an unmanaged in-memory copy of the elements in a RealmResults. This is a deep copy that will copy all referenced objects.

inline fun <T : RealmObject> RealmDictionary<T?>.copyFromRealm(depth: UInt = UInt.MAX_VALUE): Map<String, T?>

Makes an unmanaged in-memory copy of the elements in a managed RealmDictionary. This is a deep copy that will copy all referenced objects.

inline fun <T : TypedRealmObject> RealmList<T>.copyFromRealm(depth: UInt = UInt.MAX_VALUE): List<T>

Makes an unmanaged in-memory copy of the elements in a managed RealmList. This is a deep copy that will copy all referenced objects.

inline fun <T : RealmObject> RealmSet<T>.copyFromRealm(depth: UInt = UInt.MAX_VALUE): Set<T>

Makes an unmanaged in-memory copy of the elements in a managed RealmSet. This is a deep copy that will copy all referenced objects.

Link copied to clipboard

Returns whether the object is frozen or not.

Link copied to clipboard

Returns whether or not this object is managed by Realm.

Link copied to clipboard

Returns true if this object is still valid to use, i.e. the Realm is open and the underlying object has not been deleted. Unmanaged objects are always valid.

Link copied to clipboard

Returns a TypedRealmObject that represents the parent that hosts the embedded object.

Gets the parent of the embedded object, embedded objects always have an unique parent, that could be a RealmObject or another EmbeddedRealmObject.

Link copied to clipboard
inline fun <T : TypedRealmObject> MutableRealm.query(query: String = TRUE_PREDICATE, vararg args: Any?): RealmQuery<T>
inline fun <T : TypedRealmObject> Realm.query(query: String = TRUE_PREDICATE, vararg args: Any?): RealmQuery<T>
inline fun <T : TypedRealmObject> TypedRealm.query(query: String = TRUE_PREDICATE, vararg args: Any?): RealmQuery<T>

Returns a RealmQuery matching the predicate represented by query.

fun <T : BaseRealmObject> RealmDictionary<T?>.query(filter: String = TRUE_PREDICATE, vararg arguments: Any?): RealmQuery<T>

Query the objects in a dictionary by filter and arguments. The query is launched against the output obtained from RealmDictionary.values. This means keys are not taken into consideration.

fun <T : BaseRealmObject> RealmList<T>.query(filter: String = TRUE_PREDICATE, vararg arguments: Any?): RealmQuery<T>

Query the objects in a list by filter and arguments.

fun <T : BaseRealmObject> RealmSet<T>.query(filter: String = TRUE_PREDICATE, vararg arguments: Any?): RealmQuery<T>

Query the objects in a set by filter and arguments.

Link copied to clipboard

Instantiates an unmanaged RealmDictionaryMutableEntry from a Pair of String and V that can be added to an entry set produced by RealmDictionary.entries. It is possible to add an unmanaged entry to a dictionary entry set. This will result in the entry being copied to Realm, updating the underlying RealmDictionary.

Instantiates an unmanaged RealmMapMutableEntry from another Map.Entry that can be added to an entry set produced by RealmDictionary.entries. It is possible to add an unmanaged entry to a dictionary entry set. This will result in the entry being copied to Realm, updating the underlying RealmDictionary.

Instantiates an unmanaged RealmMapMutableEntry from a key-value pair that can be added to an entry set produced by RealmDictionary.entries. It is possible to add an unmanaged entry to a dictionary entry set. This will result in the entry being copied to Realm, updating the underlying RealmDictionary.

Link copied to clipboard
fun <T> realmDictionaryOf(vararg elements: Pair<String, T>): RealmDictionary<T>

Instantiates an unmanaged RealmDictionary from a variable number of Pairs of String and T.

Instantiates an unmanaged RealmDictionary from a Collection of Pairs of String and T.

Link copied to clipboard
fun <T> realmListOf(vararg elements: T): RealmList<T>

Instantiates an unmanaged RealmList.

Link copied to clipboard
fun <T> realmSetOf(vararg elements: T): RealmSet<T>

Instantiates an unmanaged RealmSet.

Link copied to clipboard

Instantiates an unmanaged RealmDictionary containing all the elements of this iterable of Pairs of Strings and Ts.

Instantiates an unmanaged RealmDictionary containing all the elements of the receiver dictionary represented by a Map of String to T pairs.

Instantiates an unmanaged RealmDictionary containing all the elements of the receiver RealmDictionaryEntrySet.

Link copied to clipboard

Instantiates an unmanaged RealmList containing all the elements of this iterable.

Link copied to clipboard

Instantiates an unmanaged RealmSet containing all the elements of this iterable.

Link copied to clipboard

Returns the Realm version of this object. This version number is tied to the transaction the object was read from.