Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rust_decimal::Decimal #456

Merged
merged 9 commits into from
Jul 9, 2020
Merged

Conversation

pimeys
Copy link
Contributor

@pimeys pimeys commented Jun 26, 2020

Ok. This was really hard. Ready for helpful comments and things to make better. Taken some help from the original BigDecimal conversions and the postgres module in rust_decimal.

Closes: #454

Copy link

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

I can't judge this PR for correctness, but other than a nit the code itself looks good.

sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

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

Some nits and seconding @yoshuawuyts comment on comments since the math is pretty dense.

sqlx-core/src/postgres/types/bigdecimal.rs Outdated Show resolved Hide resolved
sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
sqlx-core/src/postgres/types/decimal.rs Outdated Show resolved Hide resolved
@pimeys pimeys force-pushed the decimal branch 2 times, most recently from 809a207 to 3e69903 Compare June 29, 2020 21:12
@pimeys pimeys force-pushed the decimal branch 3 times, most recently from 186317a to 136531b Compare July 3, 2020 12:35
@pimeys
Copy link
Contributor Author

pimeys commented Jul 3, 2020

Added more tests and support for MONEY.

@pimeys pimeys force-pushed the decimal branch 2 times, most recently from 7194b2d to 0cb1198 Compare July 6, 2020 09:02
@pimeys pimeys requested a review from abonander July 9, 2020 09:23
@pimeys pimeys requested a review from abonander July 9, 2020 12:05
@abonander
Copy link
Collaborator

I think this is good to go! Thanks for all the hard work.

@abonander abonander merged commit 2e3e518 into launchbadge:master Jul 9, 2020
@pimeys
Copy link
Contributor Author

pimeys commented Jul 9, 2020

Thank you for super good review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support rust-decimal's Decimal type
3 participants