support blob values #211

This commit is contained in:
Jan Prochazka
2022-02-03 14:29:46 +01:00
parent 1d52e02107
commit 7297976843
12 changed files with 112 additions and 42 deletions

View File

@@ -65,12 +65,8 @@ class Dumper extends SqlDumper {
this.putCmd('^create ^table %f (^select * ^from %f)', targetName, sourceName);
}
putValue(value) {
if (value && value.type == 'Buffer' && _isArray(value.data)) {
this.putRaw(`unhex('${arrayToHexString(value.data)}')`);
} else {
super.putValue(value);
}
putByteArrayValue(value) {
this.putRaw(`unhex('${arrayToHexString(value)}')`);
}
}