fix(doris): preserve external catalog in object browser
This commit is contained in:
1 parent
8d14a056b7
commit
a1b8174951
8 files changed
+39
-13
No files matched your search
@@ -145,7 +145,7 @@ const emit = defineEmits<{
|
||||
viewTableData: [tableName: string];
|
||||
viewTableDdl: [tableName: string];
|
||||
editTableStructure: [tableName: string];
|
||||
openObjectTable: [target: { tableName: string; schema?: string; tableType?: string }];
|
||||
openObjectTable: [target: { tableName: string; schema?: string; tableType?: string; catalog?: string }];
|
||||
objectSchemaChange: [schema: string | undefined];
|
||||
objectBrowserViewportChange: [tabId: string, viewport: ObjectBrowserViewport];
|
||||
structureEditorSaved: [commentChanged: boolean];
|
||||
@@ -1602,6 +1602,7 @@ defineExpose({ focusSearch, refreshData, handleModRTarget, requestQueryEditorExe
|
||||
:database-type="activeEffectiveDatabaseType"
|
||||
:connection-id="activeTab.connectionId"
|
||||
:database="activeTab.database"
|
||||
:catalog="activeTab.objectBrowser?.catalog"
|
||||
:execution-database="activeDataTabExecutionDatabase"
|
||||
:table-meta="activeDataTabTableMeta"
|
||||
:table-info-tab="activeTab.tableInfoTab"
|
||||
|
||||
@@ -102,12 +102,13 @@ type ObjectBrowserColumnKey = "select" | "name" | "type" | "estimatedRows" | "to
|
||||
const props = defineProps<{
|
||||
connection: ConnectionConfig;
|
||||
database: string;
|
||||
catalog?: string;
|
||||
schema?: string;
|
||||
viewport?: ObjectBrowserViewport;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
openTable: [target: { tableName: string; schema?: string; tableType?: string }];
|
||||
openTable: [target: { tableName: string; schema?: string; tableType?: string; catalog?: string }];
|
||||
schemaChange: [schema: string | undefined];
|
||||
viewportChange: [viewport: ObjectBrowserViewport];
|
||||
}>();
|
||||
@@ -712,7 +713,7 @@ function executeRowAction(row: ObjectBrowserRow, action: ObjectBrowserRowAction)
|
||||
void openTableInfo(row);
|
||||
break;
|
||||
case "open-table":
|
||||
emit("openTable", { tableName: row.name, schema: row.schema });
|
||||
emit("openTable", { tableName: row.name, schema: row.schema, catalog: props.catalog });
|
||||
break;
|
||||
case "open-source":
|
||||
void openSource(row);
|
||||
@@ -1258,7 +1259,7 @@ async function saveFileContent(content: string, defaultFileName: string, filterN
|
||||
}
|
||||
|
||||
function openViewData(row: ObjectBrowserRow) {
|
||||
emit("openTable", { tableName: row.name, schema: row.schema, tableType: row.type });
|
||||
emit("openTable", { tableName: row.name, schema: row.schema, tableType: row.type, catalog: props.catalog });
|
||||
}
|
||||
|
||||
function openStructureEditor(row: ObjectBrowserRow) {
|
||||
@@ -1903,7 +1904,7 @@ async function loadObjects() {
|
||||
rows.value = [];
|
||||
try {
|
||||
const schema = needsSchema.value ? selectedSchema.value || "" : props.database;
|
||||
const objects: ObjectInfo[] = await api.listObjects(props.connection.id, props.database, schema);
|
||||
const objects: ObjectInfo[] = await api.listObjects(props.connection.id, props.database, schema, undefined, undefined, undefined, undefined, props.catalog);
|
||||
if (id !== loadId) return;
|
||||
rows.value = buildObjectBrowserRows({
|
||||
objects,
|
||||
|
||||
@@ -1110,7 +1110,7 @@ async function openObjectBrowser() {
|
||||
connectionStore.activeConnectionId = node.connectionId;
|
||||
|
||||
if (hasTreeNodeDatabaseContext(node)) {
|
||||
queryStore.openObjectBrowser(node.connectionId, node.database, node.schema);
|
||||
queryStore.openObjectBrowser(node.connectionId, node.database, node.schema, node.catalog);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user