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
When doing a LEFT JOIN that contains a parameter ? , it will not become exposed in golang, and thus is unusable.
Same bug occurs when doing a WHERE NOT EXIST () subquery, sub parameters will not become exposed.
First time commenting on a forum like this so if this is out of place please let me know.
Version
1.20.0
What happened?
I am facing what I believe to be a similar issue as stated above. I have used the same database schema as the original post. When trying to create a dynamic way of sorting using the query below, the ? does not get exposed.
-- name: GetNpcsOrderedByNpcID :manySELECT*FROM messages
ORDER BY
CASE WHEN ? ='npc_id' THEN npc_id END ASC;
Version
1.20.0
What happened?
When doing a LEFT JOIN that contains a parameter ? , it will not become exposed in golang, and thus is unusable.
Same bug occurs when doing a WHERE NOT EXIST () subquery, sub parameters will not become exposed.
See playground for demonstration:
https://play.sqlc.dev/p/1b212317a1c11271a95746dbfd15710e0c7a1d408cd0440093dd7ba2b05c0a03
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/1b212317a1c11271a95746dbfd15710e0c7a1d408cd0440093dd7ba2b05c0a03
What operating system are you using?
Windows
What database engines are you using?
SQLite
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: