Understanding Nested Transactions with `sql.withTransaction` in Effect and `sql-drizzle`
If you have multiple depths of a transaction, does
I'm using a
sql.withTransaction run within a transaction if there is already an active one? In other words, I have a ManagedRuntime.runPromise -> which executes another ManagedRuntime.runPromise calling an Effect.Service, which in turn many of those methods call other methods wrapped in sql.withTransaction. I'm trying to wrap my head around ensuring that I'm not creating multiple database connections and separate transaction contexts. Although I don't fully grasp transaction, like if multiple nested transactions on failure should roll back entirety, or if the "3rd leg of a transaction fails, only the 3rd leg fails and then it can be configured to retry" (which seems not adivsed)I'm using a
sql-drizzle as well here