Skip to content

Commit

Permalink
Fixing typos in documentation (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaoy1 committed Nov 15, 2023
1 parent 50d363a commit 0baf28f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/usage.rst
Expand Up @@ -38,8 +38,8 @@ rules, using ``Model`` as the base class::
class User(Model):
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
fullname = Mapped[str]
nickname = Mapped[str]
fullname: Mapped[str]
nickname: Mapped[str]

See `Declarative Mapping <https://docs.sqlalchemy.org/en/14/orm/mapping_styles.html#declarative-mapping>`_
in the SQLAlchemy documentation.
Expand All @@ -53,8 +53,8 @@ naming, a ``__tablename__`` attribute can be added to the model class::

id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
fullname = Mapped[str]
nickname = Mapped[str]
fullname: Mapped[str]
nickname: Mapped[str]

Creating and Destroying Database Tables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -132,8 +132,8 @@ to with the ``__bind_key__`` attribute::

id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
fullname = Mapped[str]
nickname = Mapped[str]
fullname: Mapped[str]
nickname: Mapped[str]

To avoid duplicating the ``__bind_key__`` attribute in many model classes, you
can create an abstract parent class for each bind::
Expand All @@ -145,8 +145,8 @@ can create an abstract parent class for each bind::
class User(UsersBind):
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
fullname = Mapped[str]
nickname = Mapped[str]
fullname: Mapped[str]
nickname: Mapped[str]

The ``Alchemical`` instance can also be configured to combine the use of a main
database and binds. The following example connects to a MySQL database as the
Expand Down

0 comments on commit 0baf28f

Please sign in to comment.