feat: add --type-map to override SQL-to-Go types in bun and gorm writers

Adds WriterOptions.TypeMappings and a repeatable --type-map sqltype=gotype
flag. Defaults are unchanged when no mapping is given. Closes #36 (bun/gorm).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Hermes Agent
2026-10-03 10:28:58 +02:00
co-authored by Claude Sonnet 5.5
parent b38f53c603
commit 948419ffd3
12 changed files with 230 additions and 0 deletions
+2
View File
@@ -28,6 +28,8 @@ func NewWriter(options *writers.WriterOptions) *Writer {
config: LoadMethodConfigFromMetadata(options.Metadata),
}
w.typeMapper.SetTypeMappings(options.TypeMappings)
// Initialize templates
tmpl, err := NewTemplates()
if err != nil {