(t testing.TB, conn *pgx.Conn, sql string, arguments ...any)
| 54 | } |
| 55 | |
| 56 | func mustExec(t testing.TB, conn *pgx.Conn, sql string, arguments ...any) (commandTag pgconn.CommandTag) { |
| 57 | var err error |
| 58 | if commandTag, err = conn.Exec(context.Background(), sql, arguments...); err != nil { |
| 59 | t.Fatalf("Exec unexpectedly failed with %v: %v", sql, err) |
| 60 | } |
| 61 | return commandTag |
| 62 | } |
| 63 | |
| 64 | // Do a simple query to ensure the connection is still usable |
| 65 | func ensureConnValid(t testing.TB, conn *pgx.Conn) { |
no test coverage detected