feat(dbml): support multiline table notes in DBML
* 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:
@@ -279,13 +279,16 @@ func (md *ModelData) AddRelationshipField(field *FieldData) {
|
||||
|
||||
// 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 Go comments are emitted on a single source line.
|
||||
return strings.Join(strings.Fields(result), " ")
|
||||
}
|
||||
|
||||
func isStringLikePrimaryKeyType(goType string) bool {
|
||||
|
||||
Reference in New Issue
Block a user