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,6 +1,6 @@
<script setup lang="ts">
import DdlStorageToggle from "@/components/objects/DdlStorageToggle.vue";
import { structurePreviewHasOceanBase } from "./sidebarTreeDialogState";
import { structurePreviewDdlStorageType } from "./sidebarTreeDialogState";
import { computed, toRefs, watch } from "vue";
import { AlertTriangle, Check, Loader2, Clipboard, Plus, Trash2, Upload } from "@lucide/vue";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
@@ -469,7 +469,7 @@ watch(
<pre v-else class="max-h-[56vh] min-h-64 overflow-auto rounded bg-muted p-3 text-xs whitespace-pre-wrap" v-html="highlight(structurePreviewSql)"></pre>
</div>
<DialogFooter>
<DdlStorageToggle :database-type="structurePreviewHasOceanBase ? 'oceanbase-oracle' : undefined" :disabled="isLoadingStructurePreview || !!structurePreviewError" class="mr-auto" />
<DdlStorageToggle :database-type="structurePreviewDdlStorageType" :disabled="isLoadingStructurePreview || !!structurePreviewError" class="mr-auto" />
<Button variant="outline" @click="showStructurePreviewDialog = false">{{ t("dangerDialog.cancel") }}</Button>
<Button variant="outline" :disabled="isLoadingStructurePreview || !structurePreviewSql" @click="copyStructurePreview">
<Clipboard class="h-4 w-4" />
@@ -1,5 +1,5 @@
import { ref, shallowRef } from "vue";
import type { TreeNode } from "@/types/database";
import type { DatabaseType, TreeNode } from "@/types/database";
import type { PasteTableMode } from "@/lib/table/tableClipboard";
import { fallbackCreateDatabaseCharsetMetadata } from "@/lib/database/createDatabaseCharsetOptions";
import type { DatabaseUserIdentity } from "@/lib/database/databaseUserAdmin";
@@ -39,7 +39,7 @@ export const showBatchTruncateConfirm = ref(false);
export const showStructurePreviewDialog = ref(false);
export const showStructureDocCopyDialog = ref(false);
export const structurePreviewSql = ref("");
export const structurePreviewHasOceanBase = ref(false);
export const structurePreviewDdlStorageType = ref<DatabaseType | undefined>(undefined);
export const structurePreviewTitle = ref("");
export const structurePreviewDefaultFileName = ref("structure.sql");
export const structurePreviewError = ref("");