mysql-nio icon indicating copy to clipboard operation
mysql-nio copied to clipboard

High level transaction support?

Open pardeike opened this issue 1 year ago • 2 comments

My government organisation is switching to Swift backend micro services. We rather have as few dependencies as possible and I am really missing a way to execute multiple statements in a transaction. I guess it's kind of possible to hack that in but with many in-house developers it should rather be obvious (and documented) to do so. I am either missing that it's there or really would like to have this implemented in an intuitive to use feature.

Describe the solution you'd like Ultimately a way to execute statements inside a closure that is provided by a transaction api is what I am wishing for.

Add rollback on throwing and it becomes pretty simply to use. Of course this is just a high level wish and probably requires more - for example a way to turn off automatic transactions in a nice way without using raw sql.

/pardeike

pardeike avatar May 13 '23 11:05 pardeike

cc @gwynne

0xTim avatar Jul 05 '23 12:07 0xTim

This is already supported in the overhaul of MySQLNIO I'm currently completing, as part of a sweeping rewrite to add numerous missing features and fix several major shortcomings of the existing implementation. An initial release of the new code is expected within the next week or two.

gwynne avatar Jul 05 '23 13:07 gwynne