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。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
style: cargo fmt 格式化修复
t8y24cf179f0c0a9
diff --git a/crates/dbx-core/src/connection.rs b/crates/dbx-core/src/connection.rsindex 0d9a3727e8..f28fcb5f58 100644--- a/crates/dbx-core/src/connection.rs+++ b/crates/dbx-core/src/connection.rs@@ -549,32 +549,26 @@ impl AppState {let conns = self.connections.read().await;for (key, pool) in conns.iter() {let healthy = match pool {- PoolKind::Mysql(p, _) => {- match db::mysql::get_conn_with_health_check(p).await {- Ok(_) => true,- Err(e) => {- log::warn!("MySQL connection pool '{key}' is unhealthy: {e}");- false- }+ PoolKind::Mysql(p, _) => match db::mysql::get_conn_with_health_check(p).await {+ Ok(_) => true,+ Err(e) => {+ log::warn!("MySQL connection pool '{key}' is unhealthy: {e}");+ false}- }- PoolKind::Postgres(p) => {- match p.get().await {- Ok(client) => {- match client.simple_query("SELECT 1").await {- Ok(_) => true,- Err(e) => {- log::warn!("PostgreSQL connection pool '{key}' is unhealthy: {e}");- false- }- }- }+ },+ PoolKind::Postgres(p) => match p.get().await {+ Ok(client) => match client.simple_query("SELECT 1").await {+ Ok(_) => true,Err(e) => {log::warn!("PostgreSQL connection pool '{key}' is unhealthy: {e}");false}+ },+ Err(e) => {+ log::warn!("PostgreSQL connection pool '{key}' is unhealthy: {e}");+ false}- }+ },_ => true, // Skip non-SQL pools};if !healthy {@@ -596,11 +590,7 @@ impl AppState {// Re-establish SSH tunnels that have diedlet tunnel_connection_ids: Vec<String> = {let configs = self.configs.read().await;- configs- .iter()- .filter(|(_, c)| c.ssh_enabled && !c.ssh_host.is_empty())- .map(|(id, _)| id.clone())- .collect()+ configs.iter().filter(|(_, c)| c.ssh_enabled && !c.ssh_host.is_empty()).map(|(id, _)| id.clone()).collect()};for connection_id in tunnel_connection_ids {self.tunnels.stop_tunnel(&connection_id).await;diff --git a/crates/dbx-core/src/table_structure_sql.rs b/crates/dbx-core/src/table_structure_sql.rsindex 75d2e6b73a..04cb755454 100644--- a/crates/dbx-core/src/table_structure_sql.rs+++ b/crates/dbx-core/src/table_structure_sql.rs@@ -533,7 +533,9 @@ pub fn build_single_column_alter_sql(options: SingleColumnAlterSqlOptions) -> Ta}let Some(original) = &options.column.original else {- warnings.push("This column has no original state — ALTER statements are only available for existing columns.".to_string());+ warnings.push(+ "This column has no original state — ALTER statements are only available for existing columns.".to_string(),+ );return TableStructureSqlResult { statements, warnings };};