Add support for "nested transactions" in `Transaction`.
Hey
Currently, the classic callback db.transaction().execute(async (trx) => {}) API does not support further trx.transaction().execute(async (sp) => {}) invocation that would manage the savepoint creation and commit/rollback (and even release) for the consumer.
This exists in other database libraries out there.
Are there any reasons why we should not introduce this?
There is some need for it - https://github.com/kysely-org/kysely/issues/257#issuecomment-2198495345 got 6 reactions. It came up again in #1497.
We already support doing it "manually" with ControlledTransaction.
Should we name this trx.savepoint instead of trx.transaction? The standard name is a lie (savepoints are not transactions), and we like being explicit here. At the same time, this might be slightly annoying for contexts that handle both Kysely and Transaction instances.
Source: kysely-org/kysely