Skip to content

Commit 46faa67

Browse files
committed
Fix code sample highlight lines
1 parent 1ef61ce commit 46faa67

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/advanced/column-types.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ Note that while the column types for these are `VARCHAR`, values are not convert
123123

124124
IP Addresses from the <a href="https://docs.python.org/3/library/ipaddress.html" class="external-link" target="_blank">Python `ipaddress` module</a> are stored as text.
125125

126-
```Python hl_lines="1 12"
126+
```Python hl_lines="5 11"
127127
{!./docs_src/advanced/column_types/tutorial003.py[ln:1-15]!}
128128
```
129129

130130
### Filesystem Paths
131131

132132
Paths to files and directories using the <a href="https://docs.python.org/3/library/pathlib.html" class="external-link" target="_blank">Python `pathlib` module</a> are stored as text.
133133

134-
```Python hl_lines="3 13"
134+
```Python hl_lines="2 12"
135135
{!./docs_src/advanced/column_types/tutorial003.py[ln:1-15]!}
136136
```
137137

@@ -147,10 +147,20 @@ ensure you call `absolute()` on the path before setting it in your model.
147147
UUIDs from the <a href="https://docs.python.org/3/library/uuid.html" class="external-link" target="_blank">Python `uuid`
148148
module</a> are stored as `UUID` types in supported databases (just PostgreSQL at the moment), otherwise as a `CHAR(32)`.
149149

150-
```Python hl_lines="4 11"
150+
```Python hl_lines="3 10"
151151
{!./docs_src/advanced/column_types/tutorial003.py[ln:1-15]!}
152152
```
153153

154+
### Email Addresses
155+
156+
Email addresses using <a href="https://docs.pydantic.dev/latest/api/networks/#pydantic.networks.EmailStr" class="external-link" target="_blank">Pydantic's `EmailStr` type</a>
157+
are stored as strings.
158+
159+
```Python hl_lines="5 14"
160+
{!./docs_src/advanced/column_types/tutorial003.py[ln:1-15]!}
161+
```
162+
163+
154164
## Custom Pydantic types
155165

156166
As SQLModel is built on Pydantic, you can use any custom type as long as it would work in a Pydantic model. However, if

0 commit comments

Comments
 (0)