-
Notifications
You must be signed in to change notification settings - Fork 905
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed