Version
1.14.0
What happened?
Running sqlc generate with the "mysql" driver against a DDL with expressions in a column DEFAULT 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
sqlc generate failed.
# package db
query.sql:5:43: syntax error near "BIO_FUNC()"
Database schema
-- Example queries for sqlc
CREATE TABLE authors (
id INT PRIMARY KEY,
name text NOT NULL,
bio text NOT NULL DEFAULT BIO_FUNC()
);
SQL queries
No response
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "mysql",
"schema": "query.sql",
"queries": "query.sql"
}
]
}
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
Version
1.14.0
What happened?
Running
sqlc generatewith the "mysql" driver against a DDL with expressions in a columnDEFAULTclause 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