feat(easysearch): add first-class database support

This commit is contained in:
t8y2 committed 2026-07-30 19:03:09 +08:00
1 parent daf6bce72b
commit 350096b4f7
80 files changed
+875 -107

No files matched your search

+27
View File
@@ -922,6 +922,20 @@ async fn test_connection_with_info_inner(
.await
.map(|_| "Connection successful".to_string())
}
DatabaseType::Easysearch => {
let mut client = db::easysearch_driver::EasysearchClient::from_config(
&url,
Some(&config.username),
Some(&config.password),
config.ssl,
config.url_params.as_deref(),
config.external_config.as_ref(),
connect_timeout,
);
db::easysearch_driver::test_connection(&mut client, connect_timeout)
.await
.map(|_| "Connection successful".to_string())
}
DatabaseType::Hbase => {
let client = db::hbase_driver::HBaseClient::new(
&url,
@@ -1243,6 +1257,19 @@ pub async fn connect_db(
db::elasticsearch_driver::test_connection(&mut client, connect_timeout).await?;
PoolKind::Elasticsearch(client)
}
DatabaseType::Easysearch => {
let mut client = db::easysearch_driver::EasysearchClient::from_config(
&url,
Some(&db_config.username),
Some(&db_config.password),
db_config.ssl,
db_config.url_params.as_deref(),
db_config.external_config.as_ref(),
connect_timeout,
);
db::easysearch_driver::test_connection(&mut client, connect_timeout).await?;
PoolKind::Easysearch(client)
}
DatabaseType::Hbase => {
let client = db::hbase_driver::HBaseClient::new(
&url,
+1
View File
@@ -368,6 +368,7 @@ mod tests {
assert!(ensure_mcp_execute_and_show_supported(&DatabaseType::MongoDb).is_err());
assert!(ensure_mcp_execute_and_show_supported(&DatabaseType::Redis).is_err());
assert!(ensure_mcp_execute_and_show_supported(&DatabaseType::Elasticsearch).is_err());
assert!(ensure_mcp_execute_and_show_supported(&DatabaseType::Easysearch).is_err());
}
#[test]