Add a SQL DDL backend to h5cpp-compiler that emits CREATE TABLE statements from annotated C++ structs. Support three dialects: PostgreSQL, MySQL, and SQLite3.
Scope
- New backend flag: --sql-postgres, --sql-mysql, --sql-lite3
- Unified output flag model: each backend gets a boolean flag; -o specifies the output file
- Type map: C++ primitives → dialect-specific SQL types
- Nested structs → JSON/JSONB columns (configurable)
- Arrays → dialect-specific array/JSON types
- Constraints: PRIMARY KEY, UNIQUE, NOT NULL, DEFAULT, FOREIGN KEY, CHECK, INDEX
- Attributes: sql::table, sql::column, sql::dialect, sql::primary_key, sql::unique, sql::not_null, sql::default, sql::foreign_key, sql::check, sql::index, sql::type_override, sql::nested
Acceptance Criteria
Add a SQL DDL backend to h5cpp-compiler that emits CREATE TABLE statements from annotated C++ structs. Support three dialects: PostgreSQL, MySQL, and SQLite3.
Scope
Acceptance Criteria