Handling Nested Transactions in `sql.withTransaction`

With a helper like this, what happens if we pass in an Effect that itself is wrapped/piped with its own sql.withTransaction? In other words, if we have nested sql.withTransaction is there any issue?
    /**
     * Execute a function within a database transaction
     * Automatically rolls back on any error
     */
    withTransaction: <R, E, A>(operation: Effect.Effect<A, E, R>) => {
        return Effect.gen(function* () {
            const sql = yield* SqlClient.SqlClient;
            return yield* sql.withTransaction(operation);
        });
    },
Was this page helpful?