feat: custom SQL-to-Go type mapping (--type-map) for bun/gorm #47

Merged
warkanum merged 1 commits from issue-36-type-mapping into master 2026-10-03 18:11:00 +00:00
Member

Refs #36.

Adds WriterOptions.TypeMappings and a repeatable --type-map sqltype=gotype flag overriding the hardcoded SQL→Go mappings in the bun and gorm writers. Defaults unchanged when unset. NOT NULL uses the type verbatim, nullable gets *, arrays become []T. Documented in README.

Scope/caveats: only bun and gorm (the Go code generators); no config file, flag only; the flag does not add imports for package-qualified types; end-to-end CLI run not performed (unit tests cover parser and both mappers).

🤖 Generated with Claude Code

Refs #36. Adds `WriterOptions.TypeMappings` and a repeatable `--type-map sqltype=gotype` flag overriding the hardcoded SQL→Go mappings in the bun and gorm writers. Defaults unchanged when unset. NOT NULL uses the type verbatim, nullable gets `*`, arrays become `[]T`. Documented in README. Scope/caveats: only bun and gorm (the Go code generators); no config file, flag only; the flag does not add imports for package-qualified types; end-to-end CLI run not performed (unit tests cover parser and both mappers). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sgcommand added 1 commit 2026-10-03 08:29:13 +00:00
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>
warkanum merged commit 29e747393d into master 2026-10-03 18:11:00 +00:00
warkanum deleted branch issue-36-type-mapping 2026-10-03 18:11:00 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wdevs/relspecgo#47