We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
1.14.0
Running sqlc generate with the "mysql" driver against a DDL with expressions in a column DEFAULT clause fails with an SQL syntax error message.
sqlc generate
DEFAULT
Changing the "engine" from "mysql" to "postgresql" in the playground link below results in successful code generation.
sqlc generate failed. # package db query.sql:5:43: syntax error near "BIO_FUNC()"
-- Example queries for sqlc CREATE TABLE authors ( id INT PRIMARY KEY, name text NOT NULL, bio text NOT NULL DEFAULT BIO_FUNC() );
No response
{ "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "query.sql", "queries": "query.sql" } ] }
https://play.sqlc.dev/p/abfc94a7837eec5ceee75e58e7db6dcd6654f4055bbf241bb72ef2306deacd44
MySQL
Go
The text was updated successfully, but these errors were encountered:
(chore): Upgrade tidb_parser to new repository
7a70322
fixes: sqlc-dev#1795 Refs: sqlc-dev#1197 sqlc-dev#1754
test(MySQL): Add test for default column values
a857fe8
Refs: sqlc-dev#1197 sqlc-dev#1754
Upgrade pingcap parser (#1759) (#1760)
e5ba388
* (chore): Upgrade tidb_parser to new repository fixes: #1795 Refs: #1197 #1754 * test(MySQL): Add test for default column values Refs: #1197 #1754
We've upgraded to the latest version of the MySQL parser which should fix this issue.
Sorry, something went wrong.
Upgrade pingcap parser (sqlc-dev#1759) (sqlc-dev#1760)
ec7e36b
* (chore): Upgrade tidb_parser to new repository fixes: sqlc-dev#1795 Refs: sqlc-dev#1197 sqlc-dev#1754 * test(MySQL): Add test for default column values Refs: sqlc-dev#1197 sqlc-dev#1754
No branches or pull requests
Version
1.14.0
What happened?
Running
sqlc generate
with the "mysql" driver against a DDL with expressions in a columnDEFAULT
clause fails with an SQL syntax error message.Changing the "engine" from "mysql" to "postgresql" in the playground link below results in successful code generation.
Relevant log output
Database schema
SQL queries
No response
Configuration
Playground URL
https://play.sqlc.dev/p/abfc94a7837eec5ceee75e58e7db6dcd6654f4055bbf241bb72ef2306deacd44
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: