📝 Update all docs references to Optional to use the new syntax in Python 3.10, e.g. int | None (#1351)

This commit is contained in:
Sebastián Ramírez
2025-04-27 20:53:37 +02:00
committed by GitHub
parent 0e5e19773c
commit 61523864f1
15 changed files with 52 additions and 66 deletions
+2 -2
View File
@@ -252,10 +252,10 @@ For example this class is part of that **Object** Oriented Programming:
```Python
class Hero(SQLModel):
id: Optional[int] = Field(default=None, primary_key=True)
id: int | None = Field(default=None, primary_key=True)
name: str
secret_name: str
age: Optional[int] = None
age: int | None = None
```
* **Relational**: refers to the **SQL Databases**. Remember that they are also called **Relational Databases**, because each of those tables is also called a "**relation**"? That's where the "**Relational**" comes from.