From 8680c415ab9a77419ed5543eb2ce16973ba5464c Mon Sep 17 00:00:00 2001 From: Sateesh Kadiyala Date: Mon, 10 Jul 2023 12:12:56 -0500 Subject: [PATCH] changing defaults for Double & Boolean --- lib/resultset.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resultset.js b/lib/resultset.js index d175f3f..0b8c165 100644 --- a/lib/resultset.js +++ b/lib/resultset.js @@ -130,8 +130,8 @@ ResultSet.prototype.toObjectIter = function (callback) { var dateVal = self._rs[getter](cmd.label); result[cmd.label] = dateVal ? dateVal.toString() : null; } else { - // If the column is an integer and is null, set result to null and continue - if (type === 'Int' && _.isNull(self._rs.getObjectSync(cmd.label))) { + // If the column is an integer or Double or Boolean and is null, set result to null and continue + if ((type === 'Int' || type === 'Double' || type === 'Boolean') && _.isNull(self._rs.getObjectSync(cmd.label))) { result[cmd.label] = null; return; }