Skip to content

Commit 466b24b

Browse files
authored
📝 Update admonitions, simplify and use defaults (#1915)
1 parent a2505c5 commit 466b24b

27 files changed

Lines changed: 41 additions & 52 deletions

docs/advanced/decimal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Pydantic has special support for <a href="https://docs.pydantic.dev/latest/api/s
2323

2424
When you use `Decimal` you can specify the number of digits and decimal places to support in the `Field()` function. They will be validated by Pydantic (for example when using FastAPI) and the same information will also be used for the database columns.
2525

26-
/// info
26+
/// note
2727

2828
For the database, **SQLModel** will use <a href="https://docs.sqlalchemy.org/en/20/core/type_basics.html#sqlalchemy.types.DECIMAL" class="external-link" target="_blank">SQLAlchemy's `DECIMAL` type</a>.
2929

docs/advanced/uuid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You might have seen **UUIDs**, for example in URLs. They look something like thi
1212

1313
UUIDs can be particularly useful as an alternative to auto-incrementing integers for **primary keys**.
1414

15-
/// info
15+
/// note
1616

1717
Official support for UUIDs was added in SQLModel version `0.0.20`.
1818

docs/databases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Intro to Databases
22

3-
/// info
3+
/// note
44

55
Are you a seasoned developer and already know everything about databases? 🤓
66

@@ -317,7 +317,7 @@ Next, it receives the data and puts it in Python objects that you can continue t
317317

318318
I'll tell you more about SQL, SQLModel, how to use them, and how they are related in the next sections.
319319

320-
/// info | Technical Details
320+
/// note | Technical Details
321321

322322
SQLModel is built on top of SQLAlchemy. It is, in fact, just <a href="https://www.sqlalchemy.org/" class="external-link" target="_blank">SQLAlchemy</a> and <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a> mixed together with some sugar on top.
323323

docs/db-to-code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Then your code will continue to execute and calmly tell the user that it couldn'
190190

191191
But we never deleted the `hero` table. 🎉
192192

193-
/// info
193+
/// note
194194

195195
Of course, there are also other ways to do SQL data sanitization without using a tool like **SQLModel**, but it's still a nice feature you get by default.
196196

@@ -296,7 +296,7 @@ There are many ORMs available apart from **SQLModel**, you can read more about s
296296

297297
## SQL Table Names
298298

299-
/// info | Technical Background
299+
/// note | Technical Background
300300

301301
This is a bit of boring background for SQL purists. Feel free to skip this section. 😉
302302

docs/help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ And if there's any other style or consistency need, I'll ask directly for that,
157157

158158
* Then **comment** saying that you did that, that's how I will know you really checked it.
159159

160-
/// info
160+
/// note
161161

162162
Unfortunately, I can't simply trust PRs that just have several approvals.
163163

docs/tutorial/connect/create-connected-rows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Each row in the table `hero` will point to a row in the table `team`:
3737

3838
<img alt="table relationships" src="/img/tutorial/relationships/select/relationships2.drawio.svg">
3939

40-
/// info
40+
/// note
4141

4242
We will later update **Spider-Boy** to add him to the **Preventers** team too, but not yet.
4343

docs/tutorial/connect/create-connected-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ This is the name of the **table** in the database, so it is `"team"`, not the na
100100

101101
If you had a custom table name, you would use that custom table name.
102102

103-
/// info
103+
/// note
104104

105105
You can learn about setting a custom table name for a model in the Advanced User Guide.
106106

docs/tutorial/connect/read-connected-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ FROM hero, team
5555
WHERE hero.team_id = team.id
5656
```
5757

58-
/// info
58+
/// note
5959

6060
Because we have two columns called `name`, one for `hero` and one for `team`, we can specify them with the prefix of the table name and the dot to make it explicit what we refer to.
6161

@@ -133,7 +133,7 @@ For each iteration in the `for` loop we get a tuple with an instance of the clas
133133

134134
And in this `for` loop we assign them to the variable `hero` and the variable `team`.
135135

136-
/// info
136+
/// note
137137

138138
There was a lot of research, design, and work behind **SQLModel** to make this provide the best possible developer experience.
139139

docs/tutorial/create-db-and-table.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This class `Hero` **represents the table** for our heroes. And each instance we
4747

4848
We use the config `table=True` to tell **SQLModel** that this is a **table model**, it represents a table.
4949

50-
/// info
50+
/// note
5151

5252
It's also possible to have models without `table=True`, those would be only **data models**, without a table in the database, they would not be **table models**.
5353

@@ -366,7 +366,7 @@ INFO Engine COMMIT
366366

367367
</div>
368368

369-
/// info
369+
/// note
370370

371371
I simplified the output above a bit to make it easier to read.
372372

@@ -538,7 +538,7 @@ if __name__ == "__main__":
538538

539539
...will **not** be executed.
540540

541-
/// info
541+
/// note
542542

543543
For more information, check <a href="https://docs.python.org/3/library/__main__.html" class="external-link" target="_blank">the official Python docs</a>.
544544

docs/tutorial/fastapi/limit-and-offset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ So, we probably want to limit it.
88

99
Let's use the same **offset** and **limit** we learned about in the previous tutorial chapters for the API.
1010

11-
/// info
11+
/// note
1212

1313
In many cases, this is also called **pagination**.
1414

@@ -32,7 +32,7 @@ So, to prevent it, we add additional validation to the `limit` query parameter,
3232

3333
This way, a client can decide to take fewer heroes if they want, but not more.
3434

35-
/// info
35+
/// note
3636

3737
If you need to refresh how query parameters and their validation work, check out the docs in FastAPI:
3838

0 commit comments

Comments
 (0)