Skip to content

Commit dd3b2b8

Browse files
authored
docs: Add more documentation for go_type (#1432)
1 parent e634bb5 commit dd3b2b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/reference/config.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ Each override document has the following keys:
9898
- `nullable`:
9999
- If true, use this type when a column is nullable. Defaults to `false`.
100100

101+
For more complicated import paths, the `go_type` can also be an object.
102+
103+
```yaml
104+
version: "1"
105+
packages: [...]
106+
overrides:
107+
- db_type: "uuid"
108+
go_type:
109+
- import: "a/b/v2"
110+
package: "b"
111+
type: "MyType"
112+
pointer: false # or true
113+
```
114+
101115
## Per-Column Type Overrides
102116

103117
Sometimes you would like to override the Go type used in model or query generation for

0 commit comments

Comments
 (0)