glorp
glorp copied to clipboard
DatabasePlatform>>#convertToNumber:for: contains a bug
I think DatabasePlatform>>#convertToNumber:for: contains a bug,
Dialect doesPrecisionOf: aNumber equal: aType precision should be:
Dialect doesPrecisionOf: aNumber equal: aType scale.
If you take a look at Dialect class>>#doesPrecisionOf:equal: you can see that terminology has been mixed up (if I'm interpreting it right)
^aNumber class == self fixedPointClass and: [aNumber scale = aPrecision]```
method and argument name suggests that precision is being checked, but actually it's the scale that's being compared.