Skip to content

Type-hinting for MySQL? #686

Answered by kyleconroy
alecbz asked this question in General
Discussion options

You must be logged in to vote

Is this supposed to work right now

Nope!

or is it a known issue that more work needs to be done to support this?

Most certainly a known issue. The sqlc.arg(set_name)::bool syntax is PostgreSQL syntactic sugar for CAST ... AS. I've opened #687 to track implementation.

I'd also like to point out #655, which would also fix your issue. Since the DATEDIFF function takes two arguments of known types, sqlc will pick the correct type automatically. The issue is that I haven't generated the functions definitions yet. Soon!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alecbz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants