Closed farazfazli closed 1 year ago
@jschaf What are your thoughts on this?
Pretty reasonable. This has bitten me a few times, going from 2 params to more. Any thoughts on flag names:
--inline-params-count # if 0, don't inline; defaults to 2
Also, I'd wager that most of the pain is inlining params, not the rows.
@jschaf That flag name is great.
HI @farazfazli, this is live in the 2023-06-17 release.
First of all, I want to say thank you for creating this project, I love the concept. I also use Cornucopia which is a very similar project (also uses Docker and supports Postgres), but is written in Rust instead of Go.
I am trying out pggen and wanted to know if there's any way to have it always generate structs for the inputs and outputs - from a quick look at the source code it looks like https://github.com/jschaf/pggen/blob/main/internal/codegen/golang/templated_file.go#L114 is generating structs if there are at least 3 inputs.
I understand your motivation behind having the pggen tool have a minimal number of flags, but was wondering if a flag can be added to tweak this value?
Feel free to let me know your thoughts or if I'm missing something here. Thanks again!