mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

implement Decimal128Field

Open jschlyter opened this issue 3 years ago • 8 comments

Perhaps this have been named NumberDecimalField?

updates #1981

ping @janste63

jschlyter avatar May 25 '21 09:05 jschlyter

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

bagerard avatar Jun 06 '21 13:06 bagerard

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)

jschlyter avatar Jun 07 '21 08:06 jschlyter

FYI I opened a discussion here about exposing decimal.Decimal vs bson.Decimal128 https://github.com/MongoEngine/mongoengine/issues/1981#issuecomment-856008770

bagerard avatar Jun 07 '21 14:06 bagerard

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.

bagerard avatar Jun 08 '21 15:06 bagerard

Hello! Are there any updates on this?

fabianriewe avatar Jan 04 '22 08:01 fabianriewe

ping @bagerard

jschlyter avatar Jan 04 '22 10:01 jschlyter

Hi. Are there any updates?

leng-yue avatar Feb 18 '22 22:02 leng-yue

Any updates on this feature?

njgrisafi avatar May 11 '22 20:05 njgrisafi

ping @bagerard once again

jschlyter avatar Oct 20 '22 05:10 jschlyter

Thanks @jschlyter ! Will be released in next version

bagerard avatar Jan 01 '23 14:01 bagerard