feat(export): support database setup and batch SQL scripts
This commit is contained in:
21 files changed
+622
-235
No files matched your search
@@ -310,6 +310,7 @@ export const listSshConfigHosts = forward("listSshConfigHosts");
|
||||
// SQL File Execution
|
||||
export const previewSqlFile = forward("previewSqlFile");
|
||||
export const executeSqlFile = forward("executeSqlFile");
|
||||
export const executeSqlFiles = forward("executeSqlFiles");
|
||||
export const cancelSqlFileExecution = forward("cancelSqlFileExecution");
|
||||
export const listenSqlFileProgress = forward("listenSqlFileProgress");
|
||||
export const pendingOpenSqlFiles = forward("pendingOpenSqlFiles");
|
||||
|
||||
@@ -1495,6 +1495,10 @@ export async function executeSqlFile(request: SqlFileRequest): Promise<void> {
|
||||
return post("/api/sql-file/execute", { request });
|
||||
}
|
||||
|
||||
export async function executeSqlFiles(request: SqlFileRequest, filePaths: string[]): Promise<void> {
|
||||
return post("/api/sql-file/execute", { request, filePaths });
|
||||
}
|
||||
|
||||
export async function cancelSqlFileExecution(executionId: string): Promise<boolean> {
|
||||
return post("/api/sql-file/cancel", { executionId });
|
||||
}
|
||||
|
||||
@@ -2204,6 +2204,7 @@ export interface SqlFilePreview {
|
||||
sizeBytes: number;
|
||||
preview: string;
|
||||
canExecuteWithoutSelectedDatabase: boolean;
|
||||
establishesDatabaseContext?: boolean;
|
||||
}
|
||||
|
||||
export interface SqlFileProgress {
|
||||
@@ -2226,6 +2227,10 @@ export async function executeSqlFile(request: SqlFileRequest): Promise<void> {
|
||||
return invoke("execute_sql_file", { request });
|
||||
}
|
||||
|
||||
export async function executeSqlFiles(request: SqlFileRequest, filePaths: string[]): Promise<void> {
|
||||
return invoke("execute_sql_files", { request, filePaths });
|
||||
}
|
||||
|
||||
export async function cancelSqlFileExecution(executionId: string): Promise<boolean> {
|
||||
return invoke("cancel_sql_file_execution", { executionId });
|
||||
}
|
||||
@@ -2467,6 +2472,7 @@ export interface DatabaseExportRequest {
|
||||
includeStructure: boolean;
|
||||
includeData: boolean;
|
||||
includeObjects: boolean;
|
||||
includeCreateDatabase?: boolean;
|
||||
dropTableIfExists?: boolean;
|
||||
omitAutoIncrement?: boolean;
|
||||
failOnError?: boolean;
|
||||
|
||||
Reference in new issue
Block a user