CraZySacX / node-jdbc

JDBC Wrapper for node.js
140 stars 106 forks source link

Broken decimals #160

Closed vprus closed 6 years ago

vprus commented 6 years ago

If my SQL query returns decimals, all I get in JS is an empty objects. What appears to be is that:

CraZySacX commented 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.