sqlc
sqlc copied to clipboard
Automatically infer the types and use better Column names like offset and limit
What do you want to change?
https://docs.sqlc.dev/en/stable/howto/named_parameters.html
Not working for postgresql. original:
...
when 'all' = $1::varchar then true
...
OFFSET $2::int LIMIT $3::int;
tried both ways in docs :
sqlc.arg(exchange) and @exchange
but get errors: queries/queries.sql:1:1: could not determine data type of parameter $1
WHY bother? Because its annoying/unclear to have to use the following in the code.
Column1 string
Column2 int32
Column3 int32
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go
@Jille
In this old thread Kyle mentioned this would be broken indeed: https://github.com/sqlc-dev/sqlc/pull/209