(transaction: TransactionConnection.Service)
| 375 | const endedByDatabase = (conn: Connection.Connection) => isTransaction !== undefined && !isTransaction(conn) |
| 376 | // Check Effect's transaction lifetime before asking the driver: the connection may already be closed. |
| 377 | const transactionConnection = (transaction: TransactionConnection.Service) => |
| 378 | hasEnded(afterCommitBuffers.get(transaction)) || endedByDatabase(transaction[0]) |
| 379 | ? transactionEnded |
| 380 | : Effect.succeed(transaction[0]) |
| 381 | const getConnection = Effect.flatMap( |
| 382 | Effect.serviceOption(transactionService), |
| 383 | Option.match({ |
no test coverage detected