(cause: Cause.Cause<unknown>)
| 657 | const sql = yield* PgClient.makeClient((yield* PgClient.PgClient).config) |
| 658 | const select = sql<{ value: number }>`SELECT ${1}::int4 AS value` |
| 659 | const assertSqlFailure = (cause: Cause.Cause<unknown>) => { |
| 660 | assert.isFalse(Cause.hasDies(cause)) |
| 661 | const error = Cause.squash(cause) |
| 662 | assert.instanceOf(error, SqlError.SqlError) |
| 663 | assert.propertyVal(error.reason.cause, "code", "26000") |
| 664 | } |
| 665 | // Prepares BEGIN, the body, ROLLBACK and COMMIT. |
| 666 | yield* sql.withTransaction(Effect.andThen(select, Effect.fail("rollback"))).pipe(Effect.flip) |
| 667 | yield* sql.withTransaction(select) |
no outgoing calls
no test coverage detected