Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(import): honor connection query timeout for sql file execution

КГБ Lieu0bebb9079044
diff --git a/crates/dbx-core/src/sql_file_import.rs b/crates/dbx-core/src/sql_file_import.rs
index 708181cb75..c504e8ef77 100644
--- a/crates/dbx-core/src/sql_file_import.rs
+++ b/crates/dbx-core/src/sql_file_import.rs
@@ -1783,6 +1783,10 @@ async fn execute_sql_file_statement(
})
};
+ let timeout_secs = {
+ let configs = state.configs.read().await;
+ configs.get(&request.connection_id).map(|config| config.effective_query_timeout_secs())
+ };
let result = execute_sql_statement_with_options(
state,
&request.connection_id,
@@ -1790,7 +1794,7 @@ async fn execute_sql_file_statement(
sql,
None,
Some(child_token),
- QueryExecutionOptions { execution_id: Some(execution_id), ..Default::default() },
+ QueryExecutionOptions { execution_id: Some(execution_id), timeout_secs, ..Default::default() },
)
.await;