feat(sql): Add common whitespace characters, ASCII, HTML, backslashes to literal escaping

This commit is contained in:
Björn Benouarets
2025-11-06 19:34:48 +01:00
parent ad2eaa6ebb
commit fc982db3ef
9 changed files with 52 additions and 17 deletions

View File

@@ -92,7 +92,7 @@ func CreateTable(s *schema.Table) (*string, error) {
}
if f.Comment != nil {
comments = append(comments, fmt.Sprintf("COMMENT ON COLUMN %s.%s IS '%s'", sql.QuoteIdent(s.Name), sql.QuoteIdent(f.Name), *f.Comment))
comments = append(comments, fmt.Sprintf("COMMENT ON COLUMN %s.%s IS '%s';", sql.QuoteIdent(s.Name), sql.QuoteIdent(f.Name), *f.Comment))
}
}
@@ -105,6 +105,5 @@ func CreateTable(s *schema.Table) (*string, error) {
ddl += "\n" + strings.Join(comments, "\n")
}
log.Printf("DDL: %s", ddl)
return &ddl, nil
}