BigDecimal
A multiplatform representation of a high-precision decimal number.
This class is used to maintain precision when working with PostgreSQL's numeric type.
On JVM/Desktop, it is a typealias for
java.math.BigDecimal.On JS, it is a wrapper around a
Stringto avoid floating-point inaccuracies.
JVM/Desktop implementation of BigDecimal using java.math.BigDecimal.
JavaScript implementation of BigDecimal.
Since JS Number is a 64-bit float, we store the value as a String to preserve full precision of PostgreSQL's numeric type.