Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite: Missing IMMEDIATE and EXCLUSIVE Transaction Functionality #1182

Closed
fpgaminer opened this issue Apr 19, 2021 · 1 comment
Closed

SQLite: Missing IMMEDIATE and EXCLUSIVE Transaction Functionality #1182

fpgaminer opened this issue Apr 19, 2021 · 1 comment

Comments

@fpgaminer
Copy link

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.

@fpgaminer fpgaminer changed the title SQLite: Missing Transaction Functionality SQLite: Missing IMMEDIATE and EXLUSIVE Transaction Functionality Apr 19, 2021
@fpgaminer fpgaminer changed the title SQLite: Missing IMMEDIATE and EXLUSIVE Transaction Functionality SQLite: Missing IMMEDIATE and EXCLUSIVE Transaction Functionality Apr 19, 2021
@abonander
Copy link
Collaborator

Duplicate of #481

@abonander abonander marked this as a duplicate of #481 Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants