mongoengine
mongoengine copied to clipboard
implement Decimal128Field
Perhaps this have been named NumberDecimalField
?
updates #1981
ping @janste63
The name Decimal128 is perfect, it is also how it was named in pymodm (https://github.com/mongodb/pymodm/blob/master/pymodm/fields.py#L260).
We should rename the existing DecimalField to FloatFIeld to avoid confusion but we'll do that later
Sorry for the delay in responding to this. This is a valuable addition but it will need test coverage if you want it to move further. Please add a dedicated test_decimal128_field.py
Added in cfdb5d35e5397bc6e5f0d5b9e4e52be3ad854c90 (in fact, it was already written but I forget to push it)
FYI I opened a discussion here about exposing decimal.Decimal
vs bson.Decimal128
https://github.com/MongoEngine/mongoengine/issues/1981#issuecomment-856008770
Code looks good to me but what's now blocking is the decimal.Decimal
VS bson.Decimal128
investigations/discussions. Once we release this and people start using it, we'll have a hard time making breaking change so it's important we make a conscious decision here.
Hello! Are there any updates on this?
ping @bagerard
Hi. Are there any updates?
Any updates on this feature?
ping @bagerard once again
Thanks @jschlyter ! Will be released in next version