feat(dbml): support multiline table notes in DBML
Release / test (push) Successful in 1m45s
Release / release (push) Successful in 12m24s
Release / pkg-rpm (push) Successful in 2m3s
Release / pkg-deb (push) Successful in 2m17s
Release / pkg-aur (push) Successful in 2m47s

* Add parsing for triple-quoted table notes in DBML
* Update writer to format multiline notes correctly
* Enhance tests for multiline table notes handling
This commit is contained in:
2026-09-09 21:38:11 +02:00
parent ee5c009234
commit 161ac317f0
9 changed files with 159 additions and 17 deletions
+9 -5
View File
@@ -2,6 +2,7 @@ package drizzle
import (
"sort"
"strings"
"git.warky.dev/wdevs/relspecgo/pkg/models"
)
@@ -199,13 +200,16 @@ func NewIndexData(index *models.Index, tableVar string, tm *TypeMapper) *IndexDa
// formatComment combines description and comment into a single comment string
func formatComment(description, comment string) string {
var result string
if description != "" && comment != "" {
return description + " - " + comment
result = description + " - " + comment
} else if description != "" {
result = description
} else {
result = comment
}
if description != "" {
return description
}
return comment
// Generated TypeScript comments are emitted on a single source line.
return strings.Join(strings.Fields(result), " ")
}
// joinStrings joins a slice of strings with a separator