export/import column map support

This commit is contained in:
Jan Prochazka
2022-03-13 14:02:09 +01:00
parent 750a37a27f
commit 34dae68a62
9 changed files with 202 additions and 12 deletions

View File

@@ -186,7 +186,14 @@ export default async function createImpExpScript(extensions, values, addEditorIn
// @ts-ignore
script.assign(targetVar, ...getTargetExpr(extensions, sourceName, values, targetConnection, targetDriver));
script.copyStream(sourceVar, targetVar);
const colmap = (values[`columns_${sourceName}`] || []).filter(x => !x.skip);
let colmapVar = null;
if (colmap.length > 0) {
colmapVar = script.allocVariable();
script.assignValue(colmapVar, colmap);
}
script.copyStream(sourceVar, targetVar, colmapVar);
script.put();
}
if (addEditorInfo) {