Skip to content

Commit 09ba1cc

Browse files
committed
docs: fix typos and DeclarativeBase reference
1 parent 82e4392 commit 09ba1cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/dev/explanations/components/db.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ See MySQL docs: https://dev.mysql.com/doc/refman/8.4/en/datetime.html
4040

4141
### On SQLAlchemy usage
4242

43-
The database schemas are defined using SQLAlchemy's ORM declarative models (e.g., classes inheriting from [`declarative_base`](https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.declarative_base))
43+
The database schemas are defined using SQLAlchemy's ORM declarative models (e.g., classes inheriting from [`DeclarativeBase`](https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.DeclarativeBase))
4444
All database interactions (queries, inserts, updates, deletes) are performed using SQLAlchemy Core constructs like [`select()`](https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.select), `insert()`, `update()`, and `delete()`. There is no usage of the ORM `Session` or `sessionmaker`. Instead, operations are executed directly on a connection object (e.g., `self.conn.execute(...)`).
4545

4646
This pattern is referred within the SQLAlchemy documentation as a ["2.0-style"](https://docs.sqlalchemy.org/en/20/tutorial/index.html#sqlalchemy-unified-tutorial) of working. This is practice for asynchronous applications and when used together with FastAPI.

docs/dev/reference/coding-conventions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class Owners(Base):
107107
class Owners(Base):
108108
__tablename__ = "Owners"
109109
OwnerID: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
110-
creation_time: Mapped[datetime_now]
111-
name: Mapped[str255]
110+
CreationTime: Mapped[datetime_now]
111+
Name: Mapped[str255]
112112
```
113113

114114
</td>

0 commit comments

Comments
 (0)