fix(query): honor connection timeout during exports

This commit is contained in:
t8y2 committed 2026-06-02 19:38:21 +08:00
1 parent 2bdbcec65b
commit ccaa50e36b
7 files changed
+85 -25

No files matched your search

@@ -72,6 +72,7 @@ import { isTauriRuntime } from "@/lib/tauriRuntime";
import { copyToClipboard } from "@/lib/clipboard";
import { formatSqlInsert } from "@/lib/exportFormats";
import { fetchTableDataForExport } from "@/lib/tableDataExport";
import { queryTimeoutSecsForConnection } from "@/lib/queryTimeout";
import { useConnectionStore } from "@/stores/connectionStore";
import { useSettingsStore } from "@/stores/settingsStore";
import { useQueryStore } from "@/stores/queryStore";
@@ -785,7 +786,10 @@ async function exportData(row: ObjectBrowserRow, format: "csv" | "json" | "sql")
schema,
tableName: row.name,
columns: queryColumns,
executePage: (sql) => api.executeQuery(props.connection.id, props.database, sql),
executePage: (sql) =>
api.executeQuery(props.connection.id, props.database, sql, undefined, undefined, {
timeoutSecs: queryTimeoutSecsForConnection(props.connection),
}),
});
if (format === "csv") {
@@ -848,7 +852,10 @@ async function exportDataXlsx(row: ObjectBrowserRow) {
schema,
tableName: row.name,
columns: queryColumns,
executePage: (sql) => api.executeQuery(props.connection.id, props.database, sql),
executePage: (sql) =>
api.executeQuery(props.connection.id, props.database, sql, undefined, undefined, {
timeoutSecs: queryTimeoutSecsForConnection(props.connection),
}),
});
let outputPath = `${row.name}.xlsx`;