Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/howto/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ sql:
go_type: "time.Time"
```

.. tip::
:::{tip}
A single `db_type` override configuration applies to either nullable or non-nullable
columns, but not both. If you want the same Go type to override regardless of
nullability, you'll need to configure two overrides: one with `nullable: true` and one without.
:::

## The `overrides` list

Expand All @@ -67,12 +68,15 @@ Each element in the `overrides` list has the following keys:
Note that this only applies to `db_type` overrides and has no effect on `column` overrides.
Defaults to `false`.

.. tip::
:::{tip}
A single `db_type` override configuration applies to either nullable or non-nullable
columns, but not both. If you want the same Go type to override regardless of nullability, you'll
need to configure two overrides: one with `nullable: true` and one without.
:::

.. note:: When generating code, `column` override configurations take precedence over `db_type` configurations.
:::{note}
When generating code, `column` override configurations take precedence over `db_type` configurations.
:::

### The `go_type` map

Expand Down
Loading