5 ms·
Could you just delay the COMMIT for a few minutes/seconds/until the user navigates away? And if the user clicks UNDO, do a ROLLBACK? Edit: Of course, if anyth
by a_bonobo 13y ago
Could you just delay the COMMIT for a few minutes/seconds/until the user navigates away?
And if the user clicks UNDO, do a ROLLBACK?
Edit: Of course, if anything goes wrong before the COMMIT, you loose the transaction.
- TylerE 13y agoThat's not really feasible in a real world environment where database connections are frequently re-used and user requests are very short lived. Database transaction are like try/except blocks - designed to clean up unexpected situations instantly, not as a state mechanism.
- a_bonobo 13y agoThank you for the answer and explanation!