sql writer
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user