(t *testing.T, sql string)
| 546 | } |
| 547 | |
| 548 | func mustParseSelect(t *testing.T, sql string) *ast.SelectStmt { |
| 549 | t.Helper() |
| 550 | stmts, err := ParsePg(sql) |
| 551 | if err != nil { |
| 552 | t.Fatalf("parse %q: %v", sql, err) |
| 553 | } |
| 554 | sel, ok := stmts[0].AST.(*ast.SelectStmt) |
| 555 | if !ok { |
| 556 | t.Fatalf("expected SelectStmt, got %T", stmts[0].AST) |
| 557 | } |
| 558 | return sel |
| 559 | } |
| 560 | |
| 561 | // ---------- Risk scenario 9: typeNameFromString with quoted/reserved identifier ---------- |
| 562 |
no test coverage detected