You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not appear that there is a way to start an IMMEDIATE or EXCLUSIVE transaction for a SQLite database. All Transactions are started using BEGIN, but SQLite supports BEGIN IMMEDIATE and BEGIN EXCLUSIVE. The former is of some import for simplifying some code I'm writing. It would allow me to catch SQLITE_BUSY and retry at the start of the transaction rather than having to catch it at any point throughout a sequence of queries and add complex replay logic.
I took a look at the codebase, but didn't see an easy way to add the functionality since Transaction is generic over databases and this would be a SQLite specific feature. Perhaps begin could have some kind of TransactionOptions parameter added that could toggle database specific features? To reduce API breakage a begin_with_options API could be added.
Thank you.
The text was updated successfully, but these errors were encountered:
fpgaminer
changed the title
SQLite: Missing Transaction Functionality
SQLite: Missing IMMEDIATE and EXLUSIVE Transaction Functionality
Apr 19, 2021
fpgaminer
changed the title
SQLite: Missing IMMEDIATE and EXLUSIVE Transaction Functionality
SQLite: Missing IMMEDIATE and EXCLUSIVE Transaction Functionality
Apr 19, 2021
It does not appear that there is a way to start an
IMMEDIATE
orEXCLUSIVE
transaction for a SQLite database. AllTransaction
s are started usingBEGIN
, but SQLite supportsBEGIN IMMEDIATE
andBEGIN EXCLUSIVE
. The former is of some import for simplifying some code I'm writing. It would allow me to catch SQLITE_BUSY and retry at the start of the transaction rather than having to catch it at any point throughout a sequence of queries and add complex replay logic.I took a look at the codebase, but didn't see an easy way to add the functionality since
Transaction
is generic over databases and this would be a SQLite specific feature. Perhapsbegin
could have some kind of TransactionOptions parameter added that could toggle database specific features? To reduce API breakage abegin_with_options
API could be added.Thank you.
The text was updated successfully, but these errors were encountered: