mirror of
https://github.com/lingble/clickhouse.git
synced 2025-11-20 12:54:53 +00:00
zero int values inserting problem fix
This commit is contained in:
11
index.js
11
index.js
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user