Paste your SQL CREATE TABLE statement and instantly get a Go struct definition. Supports MySQL, PostgreSQL, SQLite, and SQL Server syntax with customizable column naming and JSON tag styles.
Paste your SQL CREATE TABLE statement and instantly get a Go struct definition. Supports MySQL, PostgreSQL, SQLite, and SQL Server syntax with customizable column naming and JSON tag styles.
Common questions and answers about this topic.
The converter supports CREATE TABLE syntax from MySQL, PostgreSQL, SQLite, and SQL Server. It correctly maps database-specific column types (such as VARCHAR, INT, BIGINT, TIMESTAMP, BOOLEAN, TEXT, etc.) to their appropriate Go type equivalents.
Yes, you can choose how SQL column names are converted to Go field names. Options include PascalCase (Go convention), preserving the original snake_case, or custom mapping rules. This ensures the generated structs match your project's coding standards.
Yes, you can configure the struct tags to include json, db (for sqlx), or gorm tags. You can also choose the tag naming convention (snake_case, camelCase, etc.) to match your API or ORM requirements.
No, the SQL DDL to Go struct conversion takes place entirely within your browser. Your SQL schema definitions are parsed locally via JavaScript and never leave your device.