feat(export): add DB2 comments to XLSX headers

This commit is contained in:
大峰 authored and GitHub committed 2026-07-29 22:37:05 +08:00
1 parent 51b5c8ae95
commit 843f945581
35 files changed
+640 -87

No files matched your search

+3 -1
View File
@@ -2135,12 +2135,13 @@ function downloadTextFile(filePath: string, fallbackFileName: string, content: s
URL.revokeObjectURL(url);
}
export async function exportQueryResultXlsx(filePath: string, sheetName: string | undefined, columns: string[], columnTypes: string[], rows: readonly (readonly XlsxCellValue[])[], numericColumnRightAlign?: boolean): Promise<void> {
export async function exportQueryResultXlsx(filePath: string, sheetName: string | undefined, columns: string[], columnTypes: string[], columnComments: readonly (string | null)[] | undefined, rows: readonly (readonly XlsxCellValue[])[], numericColumnRightAlign?: boolean): Promise<void> {
const { buildXlsxWorkbook } = await import("@/lib/export/xlsxExport");
const workbook = buildXlsxWorkbook({
sheetName: sheetName || "Export",
columns,
columnTypes,
columnComments,
rows,
numericColumnRightAlign,
});
@@ -2162,6 +2163,7 @@ export async function exportQueryResultsXlsx(
sheetName?: string;
columns: readonly string[];
columnTypes?: readonly string[];
columnComments?: readonly (string | null)[];
rows: readonly (readonly XlsxCellValue[])[];
numericColumnRightAlign?: boolean;
}[],
+5 -1
View File
@@ -3427,6 +3427,7 @@ export interface TableExportRequest {
format: "csv" | "xlsx" | "json" | "markdown" | "sql" | "txt";
columns?: string[];
columnTypes?: Array<string | null | undefined>;
columnComments?: Array<string | null> | null;
primaryKeys?: string[];
whereInput?: string;
orderBy?: string;
@@ -3481,6 +3482,7 @@ export interface QueryResultExportRequest {
exportTableName?: string;
exportColumnTypes?: Array<string | null | undefined>;
numericColumnRightAlign?: boolean;
columnComments?: Array<string | null> | null;
}
export async function startTableExport(request: TableExportRequest, onProgress: (progress: TableExportProgress) => void): Promise<TableExportProgress> {
@@ -3615,13 +3617,14 @@ export async function exportTableDataCsv(options: TableCsvExportOptions): Promis
return invoke("export_table_data_csv", { request: options });
}
export async function exportQueryResultXlsx(filePath: string, sheetName: string | undefined, columns: string[], columnTypes: string[], rows: readonly (readonly XlsxCellValue[])[], numericColumnRightAlign?: boolean): Promise<void> {
export async function exportQueryResultXlsx(filePath: string, sheetName: string | undefined, columns: string[], columnTypes: string[], columnComments: readonly (string | null)[] | undefined, rows: readonly (readonly XlsxCellValue[])[], numericColumnRightAlign?: boolean): Promise<void> {
return invoke("export_query_result_xlsx", {
request: {
filePath,
sheetName,
columns,
columnTypes,
columnComments,
rows,
numericColumnRightAlign,
},
@@ -3634,6 +3637,7 @@ export async function exportQueryResultsXlsx(
sheetName?: string;
columns: readonly string[];
columnTypes?: readonly string[];
columnComments?: readonly (string | null)[];
rows: readonly (readonly XlsxCellValue[])[];
numericColumnRightAlign?: boolean;
}[],