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:
@@ -1918,23 +1918,7 @@ function openExternalUrl(url: string) {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
form.db_type === 'mysql' ||
|
||||
form.db_type === 'postgres' ||
|
||||
form.db_type === 'redshift' ||
|
||||
form.db_type === 'informix' ||
|
||||
form.db_type === 'kingbase' ||
|
||||
form.db_type === 'highgo' ||
|
||||
form.db_type === 'yashandb' ||
|
||||
form.db_type === 'vastbase' ||
|
||||
form.db_type === 'goldendb' ||
|
||||
form.db_type === 'clickhouse' ||
|
||||
form.db_type === 'saphana' ||
|
||||
form.db_type === 'bigquery'
|
||||
"
|
||||
class="grid grid-cols-4 items-center gap-4"
|
||||
>
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<Label class="text-right">{{ t("connection.urlParams") }}</Label>
|
||||
<Input
|
||||
v-model="form.url_params"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user