public enum ConflictAlgorithmType extends Enum<ConflictAlgorithmType>
| Enum Constant and Description |
|---|
CONFLICT_ABORT
When an applicable constraint violation occurs, the ABORT resolution
algorithm aborts the current SQL statement with an SQLITE_CONSTRAINT
error and backs out any changes made by the current SQL statement; but
changes caused by prior SQL statements within the same transaction are
preserved and the transaction remains active.
|
CONFLICT_FAIL
When an applicable constraint violation occurs, the FAIL resolution
algorithm aborts the current SQL statement with an SQLITE_CONSTRAINT
error.
|
CONFLICT_IGNORE
When an applicable constraint violation occurs, the IGNORE resolution
algorithm skips the one row that contains the constraint violation and
continues processing subsequent rows of the SQL statement as if nothing
went wrong.
|
CONFLICT_REPLACE
When a UNIQUE or PRIMARY KEY constraint violation occurs, the REPLACE
algorithm deletes pre-existing rows that are causing the constraint
violation prior to inserting or updating the current row and the command
continues executing normally.
|
CONFLICT_ROLLBACK
When an applicable constraint violation occurs, the ROLLBACK resolution
algorithm aborts the current SQL statement with an SQLITE_CONSTRAINT
error and rolls back the current transaction.
|
NONE
No conflict algorithm is applied
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConflictAlgorithm() |
String |
getSql() |
static ConflictAlgorithmType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConflictAlgorithmType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConflictAlgorithmType NONE
public static final ConflictAlgorithmType CONFLICT_ROLLBACK
public static final ConflictAlgorithmType CONFLICT_ABORT
public static final ConflictAlgorithmType CONFLICT_FAIL
public static final ConflictAlgorithmType CONFLICT_IGNORE
public static final ConflictAlgorithmType CONFLICT_REPLACE
public static ConflictAlgorithmType[] values()
for (ConflictAlgorithmType c : ConflictAlgorithmType.values()) System.out.println(c);
public static ConflictAlgorithmType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getConflictAlgorithm()
public String getSql()
Copyright © 2017. All rights reserved.