TestTranspile_OtherDuckgresParamNotIntercepted guards the interception scope: only duckgres.query_source is handled here. Another duckgres.* SET is not silently swallowed by the query_source path (QuerySourceSet stays nil).
(t *testing.T)
| 65 | "garbage": "SET duckgres.query_source = 'garbage'", |
| 66 | "10KB string": "SET duckgres.query_source = '" + longJunk + "'", |
| 67 | "unicode + control chars": "SET duckgres.query_source = e'caf\\u00e9\\n\\ttab'", |
| 68 | "integer constant": "SET duckgres.query_source = 123", |
| 69 | "boolean constant": "SET duckgres.query_source = true", |
| 70 | "multiple values": "SET duckgres.query_source = 'standard', 'endpoints'", |
| 71 | "set local garbage": "SET LOCAL duckgres.query_source = 'garbage'", |
| 72 | } |
| 73 | for name, in := range inputs { |
| 74 | t.Run(name, func(t *testing.T) { |
| 75 | result, err := tr.Transpile(in) |
| 76 | if err != nil { |
| 77 | t.Fatalf("Transpile(%.80q) error: %v", in, err) |
| 78 | } |
| 79 | if result.Error == nil { |
| 80 | got := "<nil>" |
| 81 | if result.QuerySourceSet != nil { |
| 82 | got = *result.QuerySourceSet |
| 83 | } |
| 84 | t.Fatalf("Transpile(%.80q): Error = nil, want 22023 rejection (QuerySourceSet=%.80q)", in, got) |
nothing calls this directly
no test coverage detected