sqlc-dev / sqlc

Generate type-safe code from SQL
https://sqlc.dev
MIT License
11.54k stars 741 forks source link

Fixes MySQL copyfrom generation with 1 arg stucts #3446

Closed terricain closed 2 weeks ago

terricain commented 2 weeks ago

Fixes #3443

The copyfrom template generates syntactically incorrect Go when query_parameter_limit is set to 0.

There was a similar bug where by when query_parameter_limit was set to 4 but the number of copyfrom parameters was 2, the struct referenced was not being emitted.