sql writer
Some checks are pending
CI / Test (1.23) (push) Waiting to run
CI / Test (1.24) (push) Waiting to run
CI / Test (1.25) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build (push) Waiting to run

This commit is contained in:
2025-12-17 20:44:02 +02:00
parent 40bc0be1cb
commit 5e1448dcdb
48 changed files with 4592 additions and 950 deletions

View File

@@ -91,6 +91,7 @@ func (w *Writer) databaseToDrawDB(d *models.Database) *DrawDBSchema {
note += "\n"
}
note += schemaModel.Comment
_ = note // TODO: Add note/description field to DrawDBArea when supported
area := &DrawDBArea{
ID: areaID,
@@ -242,12 +243,12 @@ func (w *Writer) tableToDrawDB(table *models.Table) *DrawDBSchema {
}
// convertTableToDrawDB converts a table to DrawDB format and returns the table and next field ID
func (w *Writer) convertTableToDrawDB(table *models.Table, schemaName string, tableID, fieldID, tableIndex, tablesPerRow, gridX, gridY, colWidth, rowHeight, colorIndex int) (*DrawDBTable, int) {
func (w *Writer) convertTableToDrawDB(table *models.Table, schemaName string, tableID, fieldID, tableIndex, tablesPerRow, gridX, gridY, colWidth, rowHeight, colorIndex int) (drawTable *DrawDBTable, nextFieldID int) {
// Calculate position
x := gridX + (tableIndex%tablesPerRow)*colWidth
y := gridY + (tableIndex/tablesPerRow)*rowHeight
drawTable := &DrawDBTable{
drawTable = &DrawDBTable{
ID: tableID,
Name: table.Name,
Schema: schemaName,