(t *testing.T)
| 264 | } |
| 265 | |
| 266 | func TestExecWithQueryRewriter(t *testing.T) { |
| 267 | t.Parallel() |
| 268 | |
| 269 | ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) |
| 270 | defer cancel() |
| 271 | |
| 272 | pgxtest.RunWithQueryExecModes(ctx, t, defaultConnTestRunner, nil, func(ctx context.Context, t testing.TB, conn *pgx.Conn) { |
| 273 | qr := testQueryRewriter{sql: "select $1::int", args: []any{42}} |
| 274 | _, err := conn.Exec(ctx, "should be replaced", &qr) |
| 275 | require.NoError(t, err) |
| 276 | }) |
| 277 | } |
| 278 | |
| 279 | func TestExecFailure(t *testing.T) { |
| 280 | t.Parallel() |
nothing calls this directly
no test coverage detected