zero int values inserting problem fix

This commit is contained in:
Tgarifullin
2018-11-03 00:56:30 +03:00
committed by GitHub
parent 0758a423a5
commit 115393f59c

View File

@@ -475,18 +475,9 @@ class ClickHouse {
}).join('\t');
}
_convertTypes(value) {
if (value===true) {
return '1'
}
if (value===false) {
return '0'
}
return value != null ? value : ''
}
_mapRowAsObject(fieldList, row) {
return fieldList.map(f => encodeValue(false, this._convertTypes(row[f]), 'TabSeparated')).join('\t');
return fieldList.map(f => encodeValue(false, row[f] != null ? row[f] : '', 'TabSeparated')).join('\t');
}