Skip to content

Commit 2ec110e

Browse files
committed
📝 Hide SQLModel formatting guards in HTML comments
1 parent 7be4a3d commit 2ec110e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎docs/db-to-code.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ With **SQLModel**, instead of writing SQL statements directly, you use Python cl
129129

130130
For example, you could ask the database for the same hero with ID `2` with this code:
131131

132+
<!-- fmt:off -->
132133
```Python
133134
user_id = input("Type the user ID: ")
134135

135-
# fmt: off
136136
session.exec(
137137
select(Hero).where(Hero.id == user_id)
138138
).all()
139-
# fmt: on
140139
```
140+
<!-- fmt:on -->
141141

142142
If the user provides this ID:
143143

@@ -232,13 +232,13 @@ results = database.execute(statement)
232232

233233
But if you use common Python classes and objects, your editor will be able to help you:
234234

235+
<!-- fmt:off -->
235236
```Python
236-
# fmt: off
237237
database.execute(
238238
select(Hero).where(Hero.secret_name == "Dive Wilson")
239239
).all()
240-
# fmt: on
241240
```
241+
<!-- fmt:on -->
242242

243243
![](img/db-to-code/autocompletion01.png){class="shadow"}
244244

0 commit comments

Comments
 (0)