using GO separator for MS SQL db sync

This commit is contained in:
Jan Prochazka
2021-11-25 17:43:09 +01:00
parent 9dcc235f5a
commit 8fd2c78b6a
5 changed files with 21 additions and 5 deletions

View File

@@ -1,6 +1,21 @@
const { SqlDumper, testEqualColumns } = global.DBGATE_TOOLS;
class MsSqlDumper extends SqlDumper {
constructor(driver, options) {
super(driver);
if (options && options.useHardSeparator) {
this.useHardSeparator = true;
}
}
endCommand() {
if (this.useHardSeparator) {
this.putRaw('\nGO\n');
} else {
super.endCommand();
}
}
autoIncrement() {
this.put(' ^identity');
}