[docs] add DB nested transaction#5949
Merged
kenjis merged 4 commits intocodeigniter4:developfrom May 4, 2022
Merged
Conversation
kenjis
reviewed
May 3, 2022
kenjis
reviewed
May 3, 2022
Co-authored-by: kenjis <kenji.uui@gmail.com>
kenjis
approved these changes
May 3, 2022
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.
There's an explanation that a nested transaction is possible in CodeIgniter 4 by keeping track of the transaction depth (see
CodeIgniter4/system/Database/BaseConnection.php
Line 766 in febc03a
I want it to be clearly documented so developers can save their time instead of figuring out by examining the system/ folder.
This implies that every start (transStart/transBegin) command should behave the same as others (pushing the transaction depth) and complete (transComplete/transCommit/transRollback) command should also behave the same as the others (popping the transaction depth) as a requirement. I've examined the code and they actually behave like that so I think it's safe to document this feature.