As suggested in #36, it seems useful to support nested transactions.
These changes moves 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.
As suggested in #36, it seems useful to support nested transactions.
These changes moves 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.