Closed SoMuchForSubtlety closed 1 year ago
1.18.0
Boolean filter expressions don't seem to get processed correctly. I can get it to work by changing the query slightly, but then I lose type information.
No response
create table my_table ( invalid boolean, foo varchar );
-- name: GetData :many select * from my_table where (cast(sqlc.arg(allow_invalid) as boolean) or not invalid);
https://play.sqlc.dev/p/80e82864f4994ee1812495bbdfa2bd351fdfa43f1a15968dc61d192e79b22e28
Linux
SQLite
Go
Looks like we are at the very least not correctly handling the cast node correctly
Version
1.18.0
What happened?
Boolean filter expressions don't seem to get processed correctly. I can get it to work by changing the query slightly, but then I lose type information.
Relevant log output
No response
Database schema
SQL queries
Configuration
No response
Playground URL
https://play.sqlc.dev/p/80e82864f4994ee1812495bbdfa2bd351fdfa43f1a15968dc61d192e79b22e28
What operating system are you using?
Linux
What database engines are you using?
SQLite
What type of code are you generating?
Go