Open jquesada2016 opened 1 year ago
Those are both valid proposals.
I'm not sure why we don't expose the underlying fields publicly. I'm certain that they are not going to change, since we are not going to change the data wire format for decimals. So there is no concern about backward compatibility.
That said, they are quite unpleasant to work with. They are documented here: https://docs.edgedb.com/database/reference/protocol/dataformats#std-decimal
The
Decimal
type as provided is unusable without opting in to thewith-bigdecimal
feature flag. Without this, the type is completely opaque. Even if one does opt to usingbigdecimal
, it's an older version (0.3
rather than the current0.4
) so you get compilation errors when trying to convert aDecimal
value into aBigDecimal
value.The two main improvements that can be done here are:
Display
implementation that can be used to parse into another type