We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Other
sqlc fails to parse the query when CASE expression has ELSE clause and its value is a constant.
The example query is as below.
SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo
sqlc fails to parse this query with the error: parse table name: unexpected node type: *ast.Null.
parse table name: unexpected node type: *ast.Null
CREATE TABLE foo (id text not null);
{ "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "query.sql", "queries": "query.sql" } ] }
https://play.sqlc.dev/p/968c7c9391b3aa32774930ab1d635c081c72d6f23bdf2db7ff9c94dfba0f178a
macOS
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Version
Other
What happened?
sqlc fails to parse the query when CASE expression has ELSE clause and its value is a constant.
The example query is as below.
sqlc fails to parse this query with the error:
parse table name: unexpected node type: *ast.Null
.Relevant log output
parse table name: unexpected node type: *ast.Null
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/968c7c9391b3aa32774930ab1d635c081c72d6f23bdf2db7ff9c94dfba0f178a
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: