Skip to content

Embed with table aliases doesn't work when alias mixes cases #2718

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
andrei-dascalu opened this issue Sep 8, 2023 · 1 comment
Closed
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@andrei-dascalu
Copy link

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 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

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

@andrei-dascalu andrei-dascalu added bug Something isn't working triage New issues that hasn't been reviewed labels Sep 8, 2023
@andrei-dascalu 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
@kyleconroy
Copy link
Collaborator

Close as a duplicate of #2686

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

2 participants