| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 97.27% 97.43% +0.16%
==========================================
Files 175 177 +2
Lines 5842 5895 +53
==========================================
+ Hits 5683 5744 +61
+ Misses 159 151 -8
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
📝 Docs preview for commit b3097dd at: https://61b7250eedfd1107eee4102a--sqlmodel.netlify.app |
Sorry, something went wrong.
|
📝 Docs preview for commit f3ee8b9 at: https://61b72675216a992d57cdf825--sqlmodel.netlify.app |
Sorry, something went wrong.
|
📝 Docs preview for commit 0a83e2b at: https://61b72e60030c1ad58c750965--sqlmodel.netlify.app |
Sorry, something went wrong.
|
Awesome! Thanks for the contribution and the support @robcxyz! 🚀 🎉 I updated the docs and tests, this now has its own section in the advanced docs explaining a bit how decimals work: https://sqlmodel.tiangolo.com/advanced/decimal/ Before updating and merging this I also added this PR to Pydantic, which means that in the next Pydantic version we'll be able to have types annotated with Decimal directly instead of condecimal(), keeping editor support, etc. pydantic/pydantic#3507 🎉 This is now included in the (just released) SQLModel 0.0.5 🚀 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Per issue #30 - condecimal attributes aren't passed down into sqlalchemy types. This PR fixes that by mapping pydantic's condecimal arguments max_digits and decimal_places to sqlalchemy's decimal arguments precision and scale respectively.
main.py #395
Also adds an example with a test in the code_structure tutorial with a condecimal field with a few options.