alaisi / postgres-async-driver

Asynchronous PostgreSQL Java driver
Apache License 2.0
287 stars 38 forks source link

Support for nested transactions? #36

Closed haraldnh closed 5 years ago

haraldnh commented 7 years ago

It looks reasonably simple to add support for begin() in a Transaction, using savepoints in postgresql. This would be useful at least in our application, and I suspect others could find it a nice addition as well.

haraldnh commented 7 years ago

Looking a bit more at this, it seems the best way is to merge the QueryExecutor and TransactionExecutor interfaces, i.e. any QueryExectutor supports starting a new (potentially nested) transaction. I'll make a pull request with a small proposal.