All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.realm.kotlin.UpdatePolicy.kt Maven / Gradle / Ivy

Go to download

Library code for Realm Kotlin. This artifact is not supposed to be consumed directly, but through 'io.realm.kotlin:gradle-plugin:1.11.1' instead.

There is a newer version: 3.0.0
Show newest version
package io.realm.kotlin

/**
 * Update policy that controls how to handle import of objects with existing primary keys when
 * import them with [MutableRealm.copyToRealm] and
 * [io.realm.kotlin.dynamic.DynamicMutableRealm.copyToRealm].
 *
 * @see MutableRealm.copyToRealm
 * @see DynamicMutableRealm.copyToRealm
 */
public enum class UpdatePolicy {
    /**
     * Update policy that will disallow updating existing objects and instead throw an exception if
     * an object already exists with the same primary key.
     */
    ERROR,

    /**
     * Update policy that will update all properties on any existing objects identified with the same
     * primary key. Properties will be marked as updated in change listeners, even if the property
     * was updated to the same value.
     */
    ALL,
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy