<div dir="auto">Hey,<div dir="auto"><br></div><div dir="auto">I'm wondering if there is a way to explicitly ask for a sql rollback. I think the only way you can now trigger a rollback would be by calling the "error" function and providing an xbody.</div><div dir="auto"><br></div><div dir="auto">I have two use cases for which I think an explicit rollback mechanism (not sure how that would look like) would be handy. My main use case is rolling back everything when a validation is not ok. I don't use the "error" function because I can't return structured error messages. When I save some form with 5 fields, I mostly return an error object with the same 5 fields, so I can provide precise feedback to the user. Having to clean up all my sql work is huge drag and a source of subtle bugs. </div><div dir="auto"><br></div><div dir="auto">My second use case is testing with the database. I know some people frown upon incorporating the database into your tests, but I think that's silly so I'll ignore that. If have quite some tests that load stuff into the database as a setup step, then run some tricky query procedure, check the results, and then clear the DB again. This last step is again a big annoyance and a source of incorrectly failing tests.</div><div dir="auto"><br></div><div dir="auto">Does anyone have a good way of doing the 2 above things? Should we have an explicit "rollback" call? Probably it's quite a dangerous thing to have, but especially the first described problem is a source of serious bugs, especially in complex backend procedures.</div><div dir="auto"><br></div><div dir="auto">Any help much appreciated! </div><div dir="auto"><br></div><div dir="auto">Simon </div></div>