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
I would have expected the embed to be able to resolve the alias. In the exact same scenario but using all lowercase (eg locmain instead of locMain) works - sqlc seems to expect lowercase. However, mixing cases is valid SQL so I would say it should be accepted (or if the behavior is desired, it should be documented - however this may make it less readable in certain situations).
Relevant log output
query.sql:23:1: unable to resolve table with "sqlc.embed(locmain)": relation "locmain" does not exist
andrei-dascalu
changed the title
Embed with table aliases doesn't work when alias mixed cases
Embed with table aliases doesn't work when alias mixes cases
Sep 8, 2023
Version
1.21.0
What happened?
I would have expected the embed to be able to resolve the alias. In the exact same scenario but using all lowercase (eg
locmain
instead oflocMain
) works - sqlc seems to expect lowercase. However, mixing cases is valid SQL so I would say it should be accepted (or if the behavior is desired, it should be documented - however this may make it less readable in certain situations).Relevant log output
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
https://play.sqlc.dev/p/8aa8bb4478ca2f7a54533ec2d66a167e580a93f6879ab6af4c5ead6e6b6e989e
What operating system are you using?
No response
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: