feat(docs): export data dictionary as PDF
This commit is contained in:
1 parent
2d4ee24660
commit
b140f84ac4
28 files changed
+3108
-3
No files matched your search
@@ -95,6 +95,28 @@ export function useSidebarTreeToolRuntime(options: SidebarTreeToolRuntimeOptions
|
||||
};
|
||||
}
|
||||
|
||||
function openDataDictionary() {
|
||||
const node = activeNode.value;
|
||||
if (!node.connectionId || !node.database) return;
|
||||
if (node.type === "table" || node.type === "view" || node.type === "materialized_view") {
|
||||
const targets = selectedSameSchemaStructureTargets().filter((target) => target.type === "table" || target.type === "view" || target.type === "materialized_view");
|
||||
const tableNames = targets.length > 1 ? targets.map((target) => target.label) : [node.label];
|
||||
connectionStore.dataDictionarySource = {
|
||||
connectionId: node.connectionId,
|
||||
database: node.database,
|
||||
schema: node.schema,
|
||||
tableNames,
|
||||
};
|
||||
return;
|
||||
}
|
||||
connectionStore.dataDictionarySource = {
|
||||
connectionId: node.connectionId,
|
||||
database: node.database,
|
||||
// A database node has no schema, so the collector documents every schema.
|
||||
schema: node.type === "schema" ? node.schema : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
function openDatabaseSearch() {
|
||||
const node = activeNode.value;
|
||||
if (!node.connectionId || !node.database) return;
|
||||
@@ -193,6 +215,7 @@ export function useSidebarTreeToolRuntime(options: SidebarTreeToolRuntimeOptions
|
||||
openDataCompare,
|
||||
openDatabaseExport,
|
||||
openDatabaseSearch,
|
||||
openDataDictionary,
|
||||
openDiagram,
|
||||
openDocs,
|
||||
openFieldLineage,
|
||||
|
||||
Reference in new issue
Block a user