You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated output lacks any query parameters which yields it completely useless. All the sqlc.arg() are ignored with no errors raised.
When switched annotation to batchexec the following error is encountered: :batch* commands require parameters
Relevant log output
No response
Database schema
CREATETABLEusage (
id BIGSERIALPRIMARY KEY,
created_at timestampz not null,
user_id bigintnot null,
delta bigint
);
SQL queries
-- name: UpdateUsage :exec
merge into usage using (
selectusage.idfrom (select1) as dummy
left join usage
on user_id =sqlc.arg(user_id)
and created_at >= now() - interval '1 hour'order by id desclimit1
) ref onusage.id=ref.id
when matched then
updateset delta = delta +sqlc.arg(delta)
when not matched then
insert (user_id, delta)
values (sqlc.arg(user_id), sqlc.arg(delta));
maddsua
changed the title
sqlc completely skips over arguments in complexqueries with no error messages
sqlc completely skips over arguments in complex queries with no error messages
Oct 21, 2024
Version
1.27.0
What happened?
The generated output lacks any query parameters which yields it completely useless. All the
sqlc.arg()
are ignored with no errors raised.When switched annotation to
batchexec
the following error is encountered::batch* commands require parameters
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/b0b005a26fe2667afe52dfe4d229d18d4cde8e426ac83cbf4786ec050749875e
What operating system are you using?
Windows
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: