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(query): preserve unsafe query integers

t8y2f96faa0664a6
diff --git a/crates/dbx-core/src/query.rs b/crates/dbx-core/src/query.rs
index 741081deea..277056ca25 100644
--- a/crates/dbx-core/src/query.rs
+++ b/crates/dbx-core/src/query.rs
@@ -828,7 +828,7 @@ pub async fn do_execute(
let connections = state.connections.read().await;
let pool = connections.get(pool_key).ok_or("Connection not found")?;
- match pool {
+ let result = match pool {
#[cfg(feature = "duckdb-bundled")]
PoolKind::DuckDb(con) => {
let con = con.clone();
@@ -1059,7 +1059,7 @@ pub async fn do_execute(
}
}
.await
- .map(|result| normalize_query_result_for_js(truncate_result_with_max_rows(result, max_rows)));
+ .map(|result| truncate_result_with_max_rows(result, max_rows));
if matches!(result.as_ref(), Err(err) if err == QUERY_CANCELED) {
state.remove_pool_by_key(pool_key).await;
}
@@ -1122,9 +1122,10 @@ pub async fn do_execute(
}
})
.await
- .map(|result| normalize_query_result_for_js(truncate_result_with_max_rows(result, max_rows)))
+ .map(|result| truncate_result_with_max_rows(result, max_rows))
}
- }
+ };
+ result.map(normalize_query_result_for_js)
}
fn external_driver_query_params(