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

@@ -1,4 +1,4 @@
const { SqlDumper, testEqualColumns } = global.DBGATE_TOOLS;
const { SqlDumper, testEqualColumns, arrayToHexString } = global.DBGATE_TOOLS;
class MsSqlDumper extends SqlDumper {
constructor(driver, options) {
@@ -10,7 +10,7 @@ class MsSqlDumper extends SqlDumper {
endCommand() {
if (this.useHardSeparator) {
this.putRaw('\nGO\n');
this.putRaw('\nGO\n');
} else {
super.endCommand();
}
@@ -27,6 +27,10 @@ class MsSqlDumper extends SqlDumper {
super.putStringValue(value);
}
putByteArrayValue(value) {
super.putRaw('0x' + arrayToHexString(value));
}
allowIdentityInsert(table, allow) {
this.putCmd('^set ^identity_insert %f %k', table, allow ? 'on' : 'off');
}