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:
co-authored by
Claude Sonnet 5.5
parent
b38f53c603
commit
948419ffd3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user