SQLite's method of setting the transaction mode, is to add IMMEDIATE/EXCLUSIVE to the BEGIN command. Drogon currently hard-codes BEGIN.
The down side of this is potential transaction failures of the read and then write (or read and maybe write) pattern.
I suggest adding a newTransaction() variant that takes the following enum:
enum class TransactionType {
Default, // current behavior
Immediate, // SQLite: BEGIN IMMEDIATE
Exclusive // SQLite: BEGIN EXCLUSIVE
};
This would allow BEGIN IMMEDIATE and BEGIN EXCLUSIVE. Other databases could safely ignore this.
SQLite's method of setting the transaction mode, is to add IMMEDIATE/EXCLUSIVE to the BEGIN command. Drogon currently hard-codes BEGIN.
The down side of this is potential transaction failures of the read and then write (or read and maybe write) pattern.
I suggest adding a newTransaction() variant that takes the following enum:
This would allow BEGIN IMMEDIATE and BEGIN EXCLUSIVE. Other databases could safely ignore this.