News for hackers. Stuff that matters.
Re:Should "Yes, delete it" be red, or green? by a_bonobo on Wednesday March 26, 2014 @11:38PM (#7478448)
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.

Re:Should "Yes, delete it" be red, or green? by TylerE on Thursday March 27, 2014 @12:37AM (#7478635)
That'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.

Re:Should "Yes, delete it" be red, or green? by a_bonobo on Thursday March 27, 2014 @10:02PM (#7484855)
Thank you for the answer and explanation!