Skip to content

Conversation

@haraldnh
Copy link
Contributor

As suggested in #36, it seems useful to support nested transactions.

These changes move the functionality of the TransactionExecutor interface (begin()) into the QueryExecutor interface, allowing any QueryExecutor (currently a Db/Connection or a Transaction) to start a new transaction.

This makes it easier to write generalized code, a QueryExecutor can be passed in, and a (sub-)transaction can be run using it regardless of what happens before/after the function is called.

Merge the TransactionExecutor interface into QueryExecutor, and
implement the neccessary support so that any QueryExecutor can start
a new transaction.  If the QueryExecutor is already a transaction,
it will create a new savepoint in the database.
@alaisi alaisi self-assigned this Nov 20, 2016
@alaisi alaisi merged commit a05af06 into alaisi:master Nov 21, 2016
@alaisi
Copy link
Owner

alaisi commented Nov 21, 2016

Merged. Great stuff, thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants