This actually reminds me a lot of how Ethereum transactions are represented as code as well.
Anyone else see a parallel there?
Seems like a good idea, overall. One annoying thing that affects pretty much every database with transactions is that the effort of retrying failed transactions is pushed onto the user, by necessity.
But if your transactions are airtight chunks of code... then the DB can retry them for you and provide a simpler interface to your app code.