feat(export): run data dictionary PDF exports in background
This commit is contained in:
18 files changed
+702
-104
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { invoke as tauriInvoke } from "@tauri-apps/api/core";
|
||||
import { Channel } from "@tauri-apps/api/core";
|
||||
import type { MongoDumpFormat, MongoDumpSourceInput, MongoDumpCatalog, MongoRestoreSourcePreview, MongoDatabaseDumpRequest, MongoDatabaseRestoreRequest, MongoDatabaseDumpProgress } from "./mongodbDumpTypes";
|
||||
import type { MongoRestoreUpload, MongoSourceReadOptions } from "./mongodbDumpTypes";
|
||||
import type { UserSkillRootSettings, UserSkillsListResult, UserSkillsReadResult } from "@/types/userSkills";
|
||||
@@ -2465,6 +2466,18 @@ export async function collectDocsSnapshot(connectionId: string, database: string
|
||||
return invoke("docs_collect_snapshot", { connectionId, database, schemas, tables, projectName });
|
||||
}
|
||||
|
||||
export interface DocsCollectProgress {
|
||||
completed: number;
|
||||
total: number;
|
||||
current: string;
|
||||
}
|
||||
|
||||
export async function collectDocsSnapshotForExport(connectionId: string, database: string, schemas: string[], tables: string[], onProgress: (progress: DocsCollectProgress) => void): Promise<SchemaSnapshot> {
|
||||
const channel = new Channel<DocsCollectProgress>();
|
||||
channel.onmessage = onProgress;
|
||||
return invoke("docs_collect_snapshot_for_export", { connectionId, database, schemas, tables, projectName: database, onProgress: channel });
|
||||
}
|
||||
|
||||
export async function loadDocsAnnotations(connectionId: string): Promise<AnnotationFile | null> {
|
||||
return invoke("docs_load_annotations", { connectionId });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user