On 19 Mar 2015, at 12:29am, Keith Medcalf <kmedcalf at dessus.com> wrote:

> A statement may fail, however that does not affect other statements within 
> the transaction.  You still have to end a transaction with either a commit 
> (to commit the changes made by statements WHICH DID NOT FAIL) or rollback to 
> discard the changes made by the statements which did not fail.

Then what is the BEGIN for ?

Hmm.

<https://www.sqlite.org/lang_transaction.html>

"a transaction will also ROLLBACK if the database is closed or if an error 
occurs and the ROLLBACK conflict resolution algorithm is specified."

"If certain kinds of errors occur within a transaction, the transaction may or 
may not be rolled back automatically."

<https://www.sqlite.org/lang_conflict.html>

"The ON CONFLICT clause is not a separate SQL command. It is a non-standard 
clause that can appear in many other SQL commands. It is given its own section 
in this document because it is not part of standard SQL"

Oh dear.  It's non-standard SQL.  And the answer is that it depends.

The default behaviour is as you wrote, however.  So I was wrong.  Thanks for 
the correction.

Simon.

Reply via email to