fix(doris): preserve catalog in metadata views
This commit is contained in:
1 parent
8254cfd948
commit
a9e76dc130
10 files changed
+75
-25
No files matched your search
@@ -1416,6 +1416,7 @@ defineExpose({ focusSearch, createNewGroup, collapseAllTreeNodes });
|
||||
v-model:open="sidebarDdlOpen"
|
||||
:connection-id="sidebarDdlTarget.connectionId!"
|
||||
:database="sidebarDdlTarget.database!"
|
||||
:catalog="sidebarDdlTarget.catalog"
|
||||
:schema="sidebarDdlTarget.schema"
|
||||
:table-name="sidebarDdlTarget.label"
|
||||
:object-type="tableDdlObjectTypeForSidebarNode(sidebarDdlTarget.type)"
|
||||
|
||||
@@ -1802,9 +1802,9 @@ async function generateDdlTemplate() {
|
||||
const schema = node.schema || node.database;
|
||||
let ddl: string;
|
||||
if (node.type === "table") {
|
||||
ddl = await api.getTableDdl(node.connectionId, node.database, schema, node.label);
|
||||
ddl = await api.getTableDdl(node.connectionId, node.database, schema, node.label, undefined, node.catalog);
|
||||
} else if (node.type === "materialized_view") {
|
||||
ddl = await api.getTableDdl(node.connectionId, node.database, schema, node.label, "MATERIALIZED_VIEW");
|
||||
ddl = await api.getTableDdl(node.connectionId, node.database, schema, node.label, "MATERIALIZED_VIEW", node.catalog);
|
||||
} else {
|
||||
const result = await api.getObjectSource(node.connectionId, node.database, schema, node.label, "VIEW");
|
||||
ddl = await buildViewDdl({
|
||||
@@ -3707,7 +3707,7 @@ async function exportStructure() {
|
||||
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));
|
||||
const ddl = await api.getTableDdl(target.connectionId, target.database, target.schema || target.database, target.label, tableDdlObjectTypeForNode(target.type), target.catalog);
|
||||
parts.push(ddl.trim());
|
||||
}
|
||||
structurePreviewSql.value = joinExportedDdls(parts);
|
||||
@@ -4204,19 +4204,19 @@ function openStructureEditor() {
|
||||
const node = props.node;
|
||||
if (!node.connectionId || !node.database) return;
|
||||
if (node.type === "table") {
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.label);
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.label, undefined, undefined, node.catalog);
|
||||
return;
|
||||
}
|
||||
if (node.type === "column" && node.tableName) {
|
||||
const columnName = tableChildDropObjectName(node).trim();
|
||||
if (!columnName) return;
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.tableName, "columns", { kind: "column", name: columnName });
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.tableName, "columns", { kind: "column", name: columnName }, node.catalog);
|
||||
return;
|
||||
}
|
||||
if (node.type === "index" && node.tableName) {
|
||||
const indexName = tableChildDropObjectName(node).trim();
|
||||
if (!indexName) return;
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.tableName, "indexes", { kind: "index", name: indexName });
|
||||
queryStore.openTableStructure(node.connectionId, node.database, node.schema, node.tableName, "indexes", { kind: "index", name: indexName }, node.catalog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user