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(agent): simplify offline archive entry types

t8y201b5f317400a
diff --git a/crates/dbx-core/src/agent_service.rs b/crates/dbx-core/src/agent_service.rs
index 07ecd547b5..b699856fd2 100644
--- a/crates/dbx-core/src/agent_service.rs
+++ b/crates/dbx-core/src/agent_service.rs
@@ -1250,7 +1250,9 @@ pub struct OfflineImportPlan {
pub includes_jre: bool,
}
+type OfflineJreEntry = (String, String);
type OfflineDriverEntry = (String, String, bool);
+type OfflineArchiveEntries = (Vec<OfflineJreEntry>, Vec<OfflineDriverEntry>);
pub fn inspect_offline_zip(zip_path: &Path) -> Result<OfflineImportPlan, String> {
let file = std::fs::File::open(zip_path).map_err(|e| format!("Failed to open ZIP file: {e}"))?;
@@ -1401,7 +1403,7 @@ pub fn import_offline_zip(
fn collect_offline_entries(
archive: &mut zip::ZipArchive<std::fs::File>,
registry: &AgentRegistry,
-) -> Result<(Vec<(String, String)>, Vec<OfflineDriverEntry>), String> {
+) -> Result<OfflineArchiveEntries, String> {
let platform = AgentManager::current_platform();
let mut jre_entries = Vec::new();
let mut drivers = std::collections::BTreeMap::<String, (String, bool)>::new();