fix(export): resolve query result export progress

This commit is contained in:
uicky authored and GitHub committed 2026-06-19 11:15:18 +08:00
1 parent 59ea4eafdc
commit 0f1b5f8b53
10 files changed
+240 -27

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ export type ExportCellValue = string | number | boolean | null;
export function formatCsv(columns: string[], rows: ExportCellValue[][]): string {
const esc = (v: string) => `"${v.replace(/"/g, '""')}"`;
const header = columns.map(esc).join(",");
const body = rows.map((row) => row.map((c) => esc(c === null ? "" : String(c))).join(",")).join("\n");
const body = rows.map((row) => row.map((c) => esc(c === null ? "NULL" : String(c))).join(",")).join("\n");
return `${header}\n${body}`;
}