feat: add InfluxDB support (#980)

This commit is contained in:
John Jin authored and GitHub committed 2026-06-10 14:37:53 +08:00
1 parent c13efc65f8
commit 0bd07ccf46
23 files changed
+470 -7

No files matched your search

+10
View File
@@ -274,6 +274,8 @@ pub enum DatabaseType {
Iris,
#[serde(rename = "turso")]
Turso,
#[serde(rename = "influxdb")]
InfluxDb,
Jdbc,
}
@@ -728,6 +730,10 @@ impl ConnectionConfig {
format!("etcd://{host}:{port}")
}
DatabaseType::Iris => format!("iris://{host}:{port}{db_part}"),
DatabaseType::InfluxDb => {
let scheme = if self.ssl { "https" } else { "http" };
format!("{scheme}://{host}:{port}")
}
DatabaseType::Jdbc => "jdbc:<redacted>".to_string(),
}
}
@@ -918,6 +924,10 @@ impl ConnectionConfig {
DatabaseType::Iris => {
format!("iris://{}:{}@{host}:{port}{db_part}", username, password)
}
DatabaseType::InfluxDb => {
let scheme = if self.ssl { "https" } else { "http" };
format!("{scheme}://{host}:{port}")
}
DatabaseType::Jdbc => {
self.connection_string.as_deref().filter(|value| !value.is_empty()).unwrap_or("jdbc:").to_string()
}