data duplicator works in simple case

This commit is contained in:
Jan Prochazka
2023-02-11 10:17:10 +01:00
parent f3dd187df7
commit b5e37053b8
17 changed files with 517 additions and 61 deletions

View File

@@ -99,6 +99,14 @@ class Dumper extends SqlDumper {
putByteArrayValue(value) {
this.putRaw(`e'\\\\x${arrayToHexString(value)}'`);
}
selectScopeIdentity(table) {
this.put(
"^SELECT currval(pg_get_serial_sequence('%f','%s'))",
table,
table.columns?.find(x => x.autoIncrement)?.[0]?.columnName
);
}
}
module.exports = Dumper;