mirror of
https://github.com/fastapi/sqlmodel.git
synced 2026-05-05 14:39:25 -05:00
📝 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:
committed by
GitHub
parent
0e5e19773c
commit
61523864f1
+2
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user