fix(export): stream JSON query exports and allow web TXT

This commit is contained in:
zipg authored and GitHub committed 2026-09-14 20:04:11 +08:00
1 parent af424b782f
commit b70d6da227
8 files changed
+140 -11

No files matched your search

@@ -139,4 +139,12 @@ describe("query result SQL export progress", () => {
expect(cancelHandler.value).toBeNull();
expect(api.startQueryResultExport).toHaveBeenCalledWith(expect.objectContaining({ format: "sql", exportTableName: "users", exportColumnTypes: ["int4", "text"] }), expect.any(Function));
});
it("routes incomplete query-result JSON exports through the streaming backend", async () => {
const state = useDataGridExport(createOptions());
await state.exportJson();
expect(api.startQueryResultExport).toHaveBeenCalledWith(expect.objectContaining({ format: "json", sql: "SELECT id, name FROM users" }), expect.any(Function));
});
});