Special type without defining a special type in SQL #3509
-
It would be great if we could generate custom Go types (like SpecialType), based on existing SQL types (like string), without having to define a new SQL type. Essentially, I want to create a Go type that wraps around an existing SQL type directly.
And then have sqlc generate the following code:
This is currently possible, but you have to define a custom sql type. Implementation: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Only later I found out that you can do this using type override. |
Beta Was this translation helpful? Give feedback.
Only later I found out that you can do this using type override.
https://docs.sqlc.dev/en/latest/howto/overrides.html