Closed vprus closed 6 years ago
This is correct behavior. The default java types for NUMERIC and DECIMAL columns are BigDecimal. You are getting back a javascript wrapper object around 'BigDecimal', generated by node-java.
I can't default to calling the doubleValue
method on the BigDecimal, because that may restrict usability. The intent is to give you as much flexibility with the java object as possible.
If my SQL query returns decimals, all I get in JS is an empty objects. What appears to be is that:
java.callMethodSync(value, "doubleValue")
I do see a valid-looking value, and it seems to me that what should be done by default, since empty objects are completely useless.