From 58f29425209a855f3c662bc94a39608de415abfd Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Fri, 29 May 2026 17:56:03 +0800 Subject: [PATCH] feat: generalize URL params field to all database types and support oceanbase-oracle URL params Remove the hardcoded 12-type whitelist for the URL params form field so all database types (including agent-driven ones like oceanbase-oracle) can set custom URL parameters. Also append url_params to oceanbase-oracle connection URLs in the Rust backend (matching the existing Postgres/Redshift pattern). --- .../components/connection/ConnectionDialog.vue | 18 +----------------- crates/dbx-core/src/models/connection.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vue index d564cf55e8..6d40adab65 100644 --- a/apps/desktop/src/components/connection/ConnectionDialog.vue +++ b/apps/desktop/src/components/connection/ConnectionDialog.vue @@ -1918,23 +1918,7 @@ function openExternalUrl(url: string) { -
+
format!("firebird://{host}:{port}{db_part}"), DatabaseType::Exasol => format!("exasol://{host}:{port}{db_part}"), DatabaseType::OpenGauss => format!("opengauss://{host}:{port}{db_part}"), - DatabaseType::OceanbaseOracle => format!("oceanbase-oracle://{host}:{port}{db_part}"), + DatabaseType::OceanbaseOracle => { + let base = format!("oceanbase-oracle://{host}:{port}{db_part}"); + if params.is_empty() { base } else { format!("{base}?{params}") } + } DatabaseType::Gbase => format!("gbase://{host}:{port}{db_part}"), DatabaseType::H2 => format!("h2://{host}:{port}{db_part}"), DatabaseType::Snowflake => format!("snowflake://{host}/{db_part}"), @@ -480,7 +483,8 @@ impl ConnectionConfig { format!("opengauss://{}:{}@{host}:{port}{db_part}", username, password) } DatabaseType::OceanbaseOracle => { - format!("oceanbase-oracle://{}:{}@{host}:{port}{db_part}", username, password) + let base = format!("oceanbase-oracle://{}:{}@{host}:{port}{db_part}", username, password); + if params.is_empty() { base } else { format!("{base}?{params}") } } DatabaseType::Gbase => { format!("gbase://{}:{}@{host}:{port}{db_part}", username, password)