sqlite ON CONFLICT разница между ABORT и FAIL

Изhttp://www.sqlite.org/lang_conflict.html

ABORT When an applicable constraint violation occurs, the ABORT resolution algorithm aborts the current SQL statement with an SQLITE_CONSTRAIT 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. This is the default behavior and the behavior proscribed the SQL standard.

FAIL When an applicable constraint violation occurs, the FAIL resolution algorithm aborts the current SQL statement with an SQLITE_CONSTRAINT error. But the FAIL resolution does not back out prior changes of the SQL statement that failed nor does it end the transaction. For example, if an UPDATE statement encountered a constraint violation on the 100th row that it attempts to update, then the first 99 row changes are preserved but changes to rows 100 and beyond never occur.

Оба сохраняют изменения, сделанные до оператора, вызвавшего нарушение ограничения, и не завершают транзакцию. Итак, я полагаю, что единственная разница в том, что разрешение FAIL не позволяет вносить дальнейшие изменения, а ABORT только поддерживает только конфликтующий оператор. Я правильно понял?

13
задан David 6 July 2012 в 23:03
поделиться