Context
src/codegen/parser.rs::parse_sql_schema is a hand-rolled string scanner: uppercase + split on ; + comma-with-paren-respect. It misclassifies CHECK constraints, schema-qualified names, generated columns, quoted identifiers with whitespace, and any DDL containing semicolons inside comments.
What to do
Replace with the sqlparser crate (sqlparser = "0.50") using its Postgres + SQLite dialects. Migrate the existing ParsedSchema / TableDef / ColumnDef IR by walking sqlparser::ast::Statement::CreateTable. Drop split_respecting_parens.
Acceptance
Context
src/codegen/parser.rs::parse_sql_schemais a hand-rolled string scanner: uppercase + split on;+ comma-with-paren-respect. It misclassifies CHECK constraints, schema-qualified names, generated columns, quoted identifiers with whitespace, and any DDL containing semicolons inside comments.What to do
Replace with the
sqlparsercrate (sqlparser = "0.50") using its Postgres + SQLite dialects. Migrate the existingParsedSchema/TableDef/ColumnDefIR by walkingsqlparser::ast::Statement::CreateTable. Dropsplit_respecting_parens.Acceptance
sqlparserdependency addeds.t), quoted identifiers with spaces, CHECK clauses, GENERATED columns