Repository navigation
Roll back nested transaction scopes with savepoints - #17
Merged
Merged
Conversation
| db.insert(inner_model(id=3)) | ||
| db.insert(Record(id=3)) | ||
| raise ValueError("rollback nested scope") | ||
| assert db.registered_models() == ["Record"] |
| db.insert(Record(id=4)) | ||
| assert db.query(inner_model) == [inner_model(id=4)] | ||
|
|
||
| assert db.query(Record, order_by="id") == [Record(id=1), Record(id=4)] |
| await db.insert(inner_model(id=3)) | ||
| await db.insert(Record(id=3)) | ||
| raise ValueError("rollback nested scope") | ||
| assert db.registered_models() == ["Record"] |
| await db.insert(Record(id=4)) | ||
| assert await db.query(inner_model) == [inner_model(id=4)] | ||
|
|
||
| assert await db.query(Record, order_by="id") == [Record(id=1), Record(id=4)] |
Contributor
🔍 CI Results — ✅ All CI checks passed
Commit: |
Contributor
🛡️ Security Scan Results
🐍 Bandit Findings(5件)― クリックして展開📦 Trivy Findings(25件)― クリックして展開🔍 Grype Findings(31件)― クリックして展開❌ 1つ以上のセキュリティチェックが失敗しています。マージ前に修正してください。
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries over the SAVEPOINT fix from #7 onto current main.
Validation: 116 tests passed with APSW and 116 with sqlite3, including new regression coverage. Ruff and mypy passed.