Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/advanced/decimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For the database, **SQLModel** will use [SQLAlchemy's `DECIMAL` type](https://do

## Decimals in SQLModel

Let's say that each hero in the database will have an amount of money. We could make that field a `Decimal` type using the `condecimal()` function:
Let's say that each hero in the database will have an amount of money. We could make that field a `Decimal` type and set the number of digits and decimal places in the `Field()` function:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Let's say that each hero in the database will have an amount of money. We could make that field a `Decimal` type and set the number of digits and decimal places in the `Field()` function:
Let's say that each hero in the database will have an amount of money. We can define that field as a `Decimal` and configure the maximum number of digits and decimal places using the parameters of `Field()`:


{* ./docs_src/advanced/decimal/tutorial001_py310.py ln[1:11] hl[11] *}

Expand Down
Loading