feat(oracle): apply DDL storage stripping to Oracle

This commit is contained in:
zipg authored and GitHub committed 2026-09-22 11:55:05 +08:00
1 parent 770463e39a
commit 639abb3993
19 files changed
+414 -29

No files matched your search

@@ -1,4 +1,4 @@
import { applyDdlStoragePreference } from "@/lib/sql/ddlStorage";
import { applyDdlStoragePreference, supportsDdlStoragePreference } from "@/lib/sql/ddlStorage";
import { watch, createApp, getCurrentScope, onScopeDispose, type ShallowRef } from "vue";
import { useI18n } from "vue-i18n";
import i18n from "@/i18n";
@@ -29,7 +29,7 @@ import {
structurePreviewError,
structurePreviewSql,
structurePreviewTitle,
structurePreviewHasOceanBase,
structurePreviewDdlStorageType,
} from "@/components/sidebar/sidebarTreeDialogState";
import type { CsvQuoteMode } from "@/lib/export/csvQuoteMode";
@@ -171,7 +171,7 @@ export function useSidebarTreeExportRuntime(options: SidebarTreeExportRuntimeOpt
isLoadingStructurePreview.value = true;
structurePreviewError.value = "";
structurePreviewSql.value = "";
structurePreviewHasOceanBase.value = false;
structurePreviewDdlStorageType.value = undefined;
structureSource = [];
structurePreviewTitle.value = targets.length === 1 ? t("contextMenu.exportStructurePreviewTitle", { name: targets[0]!.label }) : t("contextMenu.exportStructurePreviewTitleMultiple", { count: targets.length });
structurePreviewDefaultFileName.value = targets.length === 1 ? `${targets[0]!.label}.sql` : "structures.sql";
@@ -186,7 +186,7 @@ export function useSidebarTreeExportRuntime(options: SidebarTreeExportRuntimeOpt
requestSource.push({ ddl, databaseType });
}
structureSource = requestSource;
structurePreviewHasOceanBase.value = requestSource.some(({ databaseType }) => databaseType === "oceanbase-oracle");
structurePreviewDdlStorageType.value = requestSource.map(({ databaseType }) => databaseType).find(supportsDdlStoragePreference);
renderStructurePreview();
} catch (error: any) {
if (requestId !== structureRequestId) return;