Open EwenQuim opened 2 months ago
Same problem
The ::
cast syntax is specific to PostgreSQL. You can use cast(<expr> AS <type>)
in sqlite.
Indeed, it works. Thank you very much !
Why isn't it the same API between databases ? I guess because of RDBMS compatibility (even if sqlc.xxx functions are not natively supported by the platforms...).
Another issue that #2800 will solve, I guess
Now, while #2800 is still not implemented, we should at least
Version
1.27.0
What happened?
I want to type-cast some query variables but it doesn't compile
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/6785d32c61ea6a4b0f4a671f52132e16a70cb1ef27065de2172d6f9ae9aeeb25
Remove the
::int
and it worksWhat operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Go