feat: add InfluxDB support (#980)
This commit is contained in:
1 parent
c13efc65f8
commit
0bd07ccf46
23 files changed
+470
-7
No files matched your search
@@ -275,6 +275,10 @@ async fn list_databases_once(state: &AppState, connection_id: &str) -> Result<Ve
|
||||
drop(connections);
|
||||
return db::clickhouse_driver::list_databases(&client).await;
|
||||
}
|
||||
if let Some(client) = extract_pool!(&connections, connection_id, InfluxDb) {
|
||||
drop(connections);
|
||||
return db::influxdb_driver::list_databases(&client).await;
|
||||
}
|
||||
try_sqlserver!(connections, connection_id, list_databases);
|
||||
if let Some(client) = extract_pool!(&connections, connection_id, Agent) {
|
||||
let is_mongo =
|
||||
@@ -448,6 +452,10 @@ async fn list_tables_once(
|
||||
drop(connections);
|
||||
return db::clickhouse_driver::list_tables(&client, clickhouse_metadata_database(database, schema)).await;
|
||||
}
|
||||
if let Some(client) = extract_pool!(&connections, &pool_key, InfluxDb) {
|
||||
drop(connections);
|
||||
return db::influxdb_driver::list_tables(&client, database).await;
|
||||
}
|
||||
try_sqlserver!(connections, &pool_key, list_tables, schema, filter, limit);
|
||||
if let Some(client) = extract_pool!(&connections, &pool_key, Agent) {
|
||||
let fallback_config = db_config.clone();
|
||||
@@ -1236,6 +1244,10 @@ pub async fn get_columns_core(
|
||||
.await
|
||||
.map(deduplicate_column_infos);
|
||||
}
|
||||
if let Some(client) = extract_pool!(&connections, &pool_key, InfluxDb) {
|
||||
drop(connections);
|
||||
return db::influxdb_driver::get_columns(&client, database, table).await.map(deduplicate_column_infos);
|
||||
}
|
||||
try_sqlserver!(connections, &pool_key, get_columns, schema, table);
|
||||
if let Some(client) = extract_pool!(&connections, &pool_key, Agent) {
|
||||
let fallback_config = db_config.clone();
|
||||
|
||||
Reference in new issue
Block a user