-
Notifications
You must be signed in to change notification settings - Fork 885
Basic usage - relation "x" does not exist #3350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@eyal-solomon1 I'm guessing you're using the wrong syntax. Also, be careful on macs. It's the only platform I see which uses ` when you meant '. My sqlite example generates go just fine using your schema https://play.sqlc.dev/p/c33a35439d22e91fc4aa9abf0b58e58cefa3ada7867784d30285886b0468536b |
@dbhoot maybe syntax is not ideal from SQLC point of view, but from SQLite point of view it is ok. Seems that issue is related to quotes, because in your example there are no quotes in schema. Also, pls check my comment under another issue - #3162 (comment) |
I encountered the same issue when using SQLite and performing migrations with Atlas. The migrations generated by Atlas include quotes, which cause sqlc to fail during parsing. When I run sqlc generate, it throws an error: relation "x" does not exist. If I manually remove the quotes, the generation works fine. However, this requires me to rehash the migration, which is quite frustrating. Shouldn't sqlc handle single quotes properly in this case? |
I'm also facing this issue when using Atlas for managing migrations. I would expect the parser to be able to handle quotes, as this is often needed to "escape" particular table or column names that may conflict with a built in statement |
I'm new to sqlc and was testing out to see if it's a good fit using an existing sqlite db's schema via |
I would like to bump this as it's also the same atlas + sqlc combination that I'm trying to use and running into the same issue. |
Uh oh!
There was an error while loading. Please reload this page.
Version
1.26.0
What happened?
Getting
relation "x" does not exist
for every query I mention in myqueries
.sql filesRelevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/7150dcc1ccab07d5dcca915b08525b015d4f94968345157779d016a74eb04279
What operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Python
The text was updated successfully, but these errors were encountered: