-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Implement transaction savepoints #1816
Conversation
e584dce
to
287b208
Compare
Pull Request Test Coverage Report for Build 12409678196Details
💛 - Coveralls |
055fefc
to
4b122f1
Compare
4b122f1
to
ae87a0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's cool feature
CHANGELOG.rst
Outdated
==== | ||
0.22.3 (unreleased) | ||
|
||
0.23.1 (unreleased) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be 0.23.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
docs/transactions.rst
Outdated
``atomic()`` and ``in_transaction()`` can be nested. The inner blocks will create transaction savepoints, | ||
and if an exception is raised and then caught outside of a nested block, the transaction will be rolled back | ||
to the state before the block was entered. The outermost block will be the one that actually commits the transaction. | ||
The savepoints are supported for Postgres, SQLite, MySQL and SQLite. For other databases, it is advised to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 times for SQlite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
Description
This PR:
Motivation and Context
Before the changes any exception within a transaction block, even nested, would rollback the whole transaction. Savepoints allow more granularity when handling errors:
How Has This Been Tested?
make ci
Checklist: