Open ChyzhykTech opened 9 months ago
Could you please provide your expert opinion, @koresar, regarding the new function and share your thoughts?
I want to note that the new function requires the creation of corresponding unit tests. However, before proceeding, I would still like to receive feedback regarding the changes.
I would avoid involving sessions for the single collection document insertions.
I would avoid involving sessions for the single collection document insertions.
Dear @koresar,
Following your suggestion, we won't use a session for a single commit.
Additionally, I've implemented a check to disallow committing zero entries (MediciError
is thrown).
Could you please review it again?
Thank you.
We need to talk. :)
This PR introduces a new helper function
commit
designed to handle the transactional commit of multipleentries
within a MongoDB session. Using themongoTransaction
helper, ensures atomicity and data integrity during the commit process.Expected syntax to use: