fix(editor): handle Oracle line comments in DDL viewer
This commit is contained in:
6 files changed
+122
-24
No files matched your search
@@ -1808,13 +1808,15 @@ const pasteTableDataCopySupported = computed(() => supportsWholeRowTableDataCopy
|
||||
|
||||
const ddlTarget = ref<TreeNode | null>(null);
|
||||
const showDdlDialog = ref(false);
|
||||
const ddlDatabaseType = computed(() => {
|
||||
if (!ddlTarget.value?.connectionId) return undefined;
|
||||
return effectiveDatabaseTypeForConnection(connectionStore.getConfig(ddlTarget.value.connectionId));
|
||||
});
|
||||
const ddlDialect = computed(() => {
|
||||
if (!ddlTarget.value?.connectionId) return "mysql";
|
||||
return codeMirrorSqlDialect(effectiveDatabaseTypeForConnection(connectionStore.getConfig(ddlTarget.value.connectionId)));
|
||||
return codeMirrorSqlDialect(ddlDatabaseType.value);
|
||||
});
|
||||
const ddlFormatDialect = computed(() => {
|
||||
if (!ddlTarget.value?.connectionId) return "generic";
|
||||
return sqlFormatDialectForDbType(effectiveDatabaseTypeForConnection(connectionStore.getConfig(ddlTarget.value.connectionId)));
|
||||
return sqlFormatDialectForDbType(ddlDatabaseType.value);
|
||||
});
|
||||
const objectSourceTarget = ref<{ node: TreeNode; initialEditing: boolean } | null>(null);
|
||||
const showObjectSourceDialog = ref(false);
|
||||
@@ -5930,6 +5932,7 @@ function treeItemMenuItems(): ContextMenuItem[] {
|
||||
:schema="ddlTarget.schema"
|
||||
:table-name="ddlTarget.label"
|
||||
:object-type="tableDdlObjectTypeForNode(ddlTarget.type)"
|
||||
:database-type="ddlDatabaseType"
|
||||
:dialect="ddlDialect"
|
||||
:format-dialect="ddlFormatDialect"
|
||||
v-model:open="showDdlDialog"
|
||||
|
||||
Reference in new issue
Block a user