Skip to content

[docs] add DB nested transaction#5949

Merged
kenjis merged 4 commits intocodeigniter4:developfrom
michaelrk02:develop
May 4, 2022
Merged

[docs] add DB nested transaction#5949
kenjis merged 4 commits intocodeigniter4:developfrom
michaelrk02:develop

Conversation

@michaelrk02
Copy link
Copy Markdown
Contributor

@michaelrk02 michaelrk02 commented May 2, 2022

There's an explanation that a nested transaction is possible in CodeIgniter 4 by keeping track of the transaction depth (see

// When transactions are nested we only begin/commit/rollback the outermost ones
).

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.

@kenjis kenjis added the documentation Pull requests for documentation only label May 2, 2022
Comment thread user_guide_src/source/database/transactions.rst Outdated
Comment thread user_guide_src/source/database/transactions.rst Outdated
@kenjis kenjis merged commit c815e7f into codeigniter4:develop May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants