copyFromRealm

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.

Parameters

depth

limit of the deep copy. All object references after this depth will be null. RealmList, RealmSet and RealmDictionary variables containing objects will be empty. Starting depth is 0.

Throws

if depth < 0 or, or the list is not valid to copy.


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.

Parameters

depth

limit of the deep copy. All object references after this depth will be null. RealmList, RealmSet and RealmDictionary variables containing objects will be empty. Starting depth is 0.

Throws

if depth < 0 or, or the list is not valid to copy.


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.

Parameters

depth

limit of the deep copy. All object references after this depth will be null. RealmLists and RealmSets containing objects will be empty. Starting depth is 0.

Throws

if depth < 0 or, or the list is not valid to copy.


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.

Parameters

depth

limit of the deep copy. All object references after this depth will be null. RealmList, RealmSet and RealmDictionary variables containing objects will be empty. Starting depth is 0.

Throws

if depth < 0 or, or the list is not valid to copy.


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.

Parameters

depth

limit of the deep copy. All object references after this depth will be null. RealmList, RealmSet and RealmDictionary variables containing objects will be empty. Starting depth is 0.

Throws

if the object is not a valid object to copy.