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

Add encoder: Decimal to Decimal128 #31

Merged
merged 9 commits into from
Oct 7, 2020

Conversation

dhensen
Copy link
Contributor

@dhensen dhensen commented Oct 2, 2020

Add an encoder to encode decimal.Decimal instances into from bson.decimal128.Decimal128.
Mongo stores this as NumberDecimal:
image

@dhensen
Copy link
Contributor Author

dhensen commented Oct 2, 2020

CI is failing, I think this will be fixed by #32

@i8enn i8enn self-assigned this Oct 2, 2020
@i8enn i8enn added the enhancement New feature or request label Oct 2, 2020
Copy link
Owner

@i8enn i8enn left a comment

Choose a reason for hiding this comment

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

Thanks! You are making a good contribution! ;)

I did a review, and for your PR to be accepted, I need you to write tests and fix code-style bugs (flake8, mypy and etc.)

tests/encoders/mongodb.py Show resolved Hide resolved
pydantic_odm/encoders/mongodb.py Outdated Show resolved Hide resolved
pydantic_odm/encoders/mongodb.py Outdated Show resolved Hide resolved
@i8enn i8enn assigned dhensen and i8enn and unassigned i8enn Oct 2, 2020
@dhensen dhensen requested a review from i8enn October 6, 2020 14:04
@i8enn
Copy link
Owner

i8enn commented Oct 7, 2020

@dhensen well done! Thanks! I'm merge this PR.

@i8enn i8enn merged commit 23b279d into i8enn:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants