Commit 1b6ba1e
Jordi Montes
fix(pgx): copyfrom imports (#1626)
Depending on the commands used in your `query.sql` the `copyfrom.go`
may end up with unused packge imports.
There is a patch for this problem that was merged in the #1386 PR.
However, it looks like some edge cases were left out of the fix.
This commit ensures that `buildImports` only has `copyfrom` queries
when called from `copyfromImports`.1 parent d458fbe commit 1b6ba1e
File tree
3 files changed
+23
-5
lines changed- internal
- codegen/golang
- endtoend/testdata/copyfrom_imports/postgresql/pgx
- go
3 files changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| |||
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments