SQLiteDatabase.ConflictReplace Field

Definition

Caution

This constant will be removed in the future version. Use Android.Database.Sqlite.Conflict enum directly instead of this field.

When a UNIQUE constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row.

[Android.Runtime.Register("CONFLICT_REPLACE")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Database.Sqlite.Conflict enum directly instead of this field.", true)]
public const Android.Database.Sqlite.Conflict ConflictReplace = 5;
[<Android.Runtime.Register("CONFLICT_REPLACE")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Database.Sqlite.Conflict enum directly instead of this field.", true)>]
val mutable ConflictReplace : Android.Database.Sqlite.Conflict

Field Value

Value = 5
Attributes

Remarks

When a UNIQUE constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row. Thus the insert or update always occurs. The command continues executing normally. No error is returned. If a NOT NULL constraint violation occurs, the NULL value is replaced by the default value for that column. If the column has no default value, then the ABORT algorithm is used. If a CHECK constraint violation occurs then the IGNORE algorithm is used. When this conflict resolution strategy deletes rows in order to satisfy a constraint, it does not invoke delete triggers on those rows. This behavior might change in a future release.

Java documentation for android.database.sqlite.SQLiteDatabase.CONFLICT_REPLACE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to