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).
This commit is contained in:
t8y2 committed 2026-05-29 17:56:03 +08:00
1 parent ef4baba57a
commit 58f2942520
2 files changed
+7 -19

No files matched your search

+6 -2
View File
@@ -353,7 +353,10 @@ impl ConnectionConfig {
DatabaseType::Firebird => 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)