From ce73c82e88e657248e20f95da4351db3c529ae29 Mon Sep 17 00:00:00 2001 From: izzm <1209784+izzm@users.noreply.github.com> Date: Mon, 7 Nov 2022 22:26:15 +0300 Subject: [PATCH] Fix insert nullable --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a86a79c..45f79a8 100644 --- a/index.js +++ b/index.js @@ -989,7 +989,7 @@ class ClickHouse { static mapRowAsObject(fieldList, row) { return fieldList .map(f => { - return encodeValue(false, row[f] != null ? row[f] : '', 'TabSeparated'); + return encodeValue(false, row[f] != null || row[f] === null ? row[f] : '', 'TabSeparated'); }) .join('\t'); }