-
Notifications
You must be signed in to change notification settings - Fork 11
Feature request: Transaction object #83
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
Comments
What's your use-case for this? Just a preference / not wanting to throw exceptions to roll back transactions? After all, you could gradually build the transaction inside the callback too. Since SQLite only supports a single concurrent writer, we have to block all other writes while a write transaction is active. An API where you'd obtain a transaction object with manual lifecycle management wouldn't change that. So there's probably not much of a difference between the two styles in practice. |
I was starting to think of a solution to build the callback gradually, but I realized I can't get the last insert rowid after a statement
Is there an other way you would build the transaction gradually that would allow to get the id of what's inserted? |
If I'm not missing anything that should be unrelated to transactions? The
If it's possible for you to rewrite your queries, you could add a |
I started doing something along those lines and it works so far. I made a function that takes a |
It would be greatly appreciated if we could get a Transaction object that could be obtained by doing db.writeTransaction() so we could gradually build a transaction and do transaction.commit when done.
Example:
Thank you
The text was updated successfully, but these errors were encountered: