SQLiteDatabase: Transaction

Hi,

when I saw something like SQLiteDatabase last example:

db.SQLExecute("BEGIN TRANSACTION")

I am awaiting an… END TRANSACTION somewhere.

I learned here lang_transaction: END TRANSACTION is an alias for COMMIT (fortunately).

Isn’t it good to make an entry in the docs to states that in a more visible state ?

You may have missed the section titled Transactions that explains this clearly.

Hi Tim,

no, I read it. Since my mother language was French, I am always doubtful of what I understand when I read foreign explanations.

And, as a developer, when I see (start bold), I am awaiting a (end bold). But this is just me. Just like on the streets, when I saw <30> (speed limitation to 30 km/h), I am awaiting an end of speed limit (and not the street name change)…

db.SQLExecute(“END”) = db.SQLExecute(“END TRANSACTION”) = db.SQLExecute(“COMMIT”) = db.Commit
BUT
db.SQLExecute(“ROLLBACK”) = db.Rollback which Ends the transaction but without committing the changes.

On a database error the transaction stays open until you do one of the above however nothing after the error will be processed. but anything prior to the error can be either committed or garbaged by using rollback

Thanks Jym.