Open buildtheui opened 4 months ago
I have the same issue (my query is structurally similar). It works fine if you use named parameters for all your params (see playground) but I can't tell if that's a known limitation or a feature. Either way, loving sqlc!
Version
1.26.0
What happened?
I'm using SQLite to create the following query:
The generated output adds an extra
2
after the firstCOALESCE
argument in the WHERE clause:This generates the following error:
missing argument with index 3
. If I manually remove the number2
, the query goes through.Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/0a1a38acf75b6e96542e9c37d008453d0d3991a42dd43ef67c4961c1214a1843
What operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Go