node-jdbc
node-jdbc copied to clipboard
ResultSet - Null integer columns returned as a zero
Hello, This issue appears again after commit 10a1928d8c65cd59ea193787d5cbe93e812278f9 this was changed:
- if(type === 'BigDecimal') type = 'Int';
+ if (type === 'BigDecimal') type = 'Double';
But the if condition didn't change:
if (type === 'Int' && _.isNull(self._rs.getObjectSync(cmd.label))) {
result[cmd.label] = null;
return;
}
Thank you, Emil
Originally posted by @EmilCernega in https://github.com/CraZySacX/node-jdbc/issues/94#issuecomment-892721143
Is there any movement on this? The fix is pretty simple. Anyway you could post an incremental release?
Here's a potential fix...
if ((type === 'Int' || type === 'Double') && _.isNull(self._rs.getObjectSync(cmd.label))) { result[cmd.label] = null; return; }