fix(oracle): export portable table DDL
This commit is contained in:
13 files changed
+241
-30
No files matched your search
@@ -80,8 +80,8 @@ describe("useSidebarTreeExportRuntime", () => {
|
||||
|
||||
expect(connectionStore.ensureConnected).toHaveBeenNthCalledWith(1, first.connectionId);
|
||||
expect(connectionStore.ensureConnected).toHaveBeenNthCalledWith(2, second.connectionId);
|
||||
expect(apiMock.getTableDdl).toHaveBeenNthCalledWith(1, first.connectionId, first.database, first.schema, first.label, undefined, undefined);
|
||||
expect(apiMock.getTableDdl).toHaveBeenNthCalledWith(2, second.connectionId, second.database, second.schema, second.label, "VIEW", undefined);
|
||||
expect(apiMock.getTableDdl).toHaveBeenNthCalledWith(1, first.connectionId, first.database, first.schema, first.label, undefined, undefined, true);
|
||||
expect(apiMock.getTableDdl).toHaveBeenNthCalledWith(2, second.connectionId, second.database, second.schema, second.label, "VIEW", undefined, true);
|
||||
expect(structurePreviewSql.value).toBe("CREATE TABLE one (id INT);\n\nCREATE VIEW two AS SELECT 1;\n");
|
||||
expect(structurePreviewTitle.value).toBe("contextMenu.exportStructurePreviewTitleMultiple");
|
||||
expect(showStructurePreviewDialog.value).toBe(true);
|
||||
|
||||
@@ -75,7 +75,7 @@ export function useSidebarTreeExportRuntime(options: SidebarTreeExportRuntimeOpt
|
||||
const parts: string[] = [];
|
||||
for (const target of targets) {
|
||||
await connectionStore.ensureConnected(target.connectionId);
|
||||
const ddl = await api.getTableDdl(target.connectionId, target.database, target.schema || target.database, target.label, tableDdlObjectTypeForNode(target.type), target.catalog);
|
||||
const ddl = await api.getTableDdl(target.connectionId, target.database, target.schema || target.database, target.label, tableDdlObjectTypeForNode(target.type), target.catalog, true);
|
||||
parts.push(ddl.trim());
|
||||
}
|
||||
structurePreviewSql.value = joinExportedDdls(parts);
|
||||
|
||||
Reference in new issue
Block a user