-
Notifications
You must be signed in to change notification settings - Fork 917
Closed
Labels
acceptedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
What do you want to change?
For Go, sqlc will use a positional argument for a query if there's a single parameter. If there's more than one, it will generate a parameters struct. While this works for me, a few other folks would like different behavior.
@brentd would like to use positional arguments for up to three parameters (#1496)
@Threpio would like to always use parameter structs (#1373)
How should we do it?
We can solve this using a single configuration parameter called query_parameter_limit
, which defaults to 1 (the current behavior). We can set the value to a pointer in the configuration YAML / JSON so that zero is a valid option. Anything less than zero should be an error.
What programming language backends need to be changed?
Go
gzuidhof, Threpio, dstrelau, diamondburned and yarox
Metadata
Metadata
Assignees
Labels
acceptedenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers