feat(cloudberry): add database support
This commit is contained in:
13 files changed
+573
-1
No files matched your search
@@ -47,6 +47,9 @@ pub(in crate::schema) async fn list_tables(
|
||||
db::mysql::list_tables(p, db).await
|
||||
}
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_questdb_config) => db::questdb::list_tables(p, schema).await,
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_cloudberry_config) => {
|
||||
db::cloudberry::list_tables_filtered(p, schema, None, None, None).await
|
||||
}
|
||||
PoolKind::Postgres(p) => db::postgres::list_tables(p, schema).await,
|
||||
PoolKind::Sqlite(p) => db::sqlite::list_tables(p, schema).await,
|
||||
PoolKind::Rqlite(client) => db::rqlite_driver::list_tables(client, schema).await,
|
||||
@@ -86,6 +89,9 @@ pub(in crate::schema) async fn list_objects(
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_questdb_config) => {
|
||||
db::questdb::list_objects(p, schema).await.map(Some)
|
||||
}
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_cloudberry_config) => {
|
||||
db::cloudberry::list_objects(p, schema).await.map(Some)
|
||||
}
|
||||
PoolKind::Postgres(p) => db::postgres::list_objects(p, schema).await.map(Some),
|
||||
_ => Ok(None),
|
||||
}
|
||||
@@ -107,6 +113,9 @@ pub(in crate::schema) async fn list_completion_objects(
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_questdb_config) => {
|
||||
db::questdb::list_objects(p, schema).await.map(Some)
|
||||
}
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_cloudberry_config) => {
|
||||
db::cloudberry::list_objects(p, schema).await.map(Some)
|
||||
}
|
||||
PoolKind::Postgres(p) => db::postgres::list_objects(p, schema).await.map(Some),
|
||||
_ => Ok(None),
|
||||
}
|
||||
@@ -237,6 +246,9 @@ pub(in crate::schema) async fn table_ddl(
|
||||
Err(_) => super::super::pg_ddl(p, schema, table).await,
|
||||
}
|
||||
}
|
||||
PoolKind::Postgres(p) if config.is_some_and(is_cloudberry_config) => {
|
||||
super::super::cloudberry_ddl(p, schema, table).await
|
||||
}
|
||||
PoolKind::Postgres(p) => super::super::pg_ddl(p, schema, table).await,
|
||||
PoolKind::Sqlite(p) => super::super::sqlite_ddl(p, schema, table).await,
|
||||
PoolKind::Rqlite(client) => db::rqlite_driver::table_ddl(client, table).await,
|
||||
@@ -316,6 +328,10 @@ fn is_opengauss_family_config(config: &ConnectionConfig) -> bool {
|
||||
|| matches!(config.driver_profile.as_deref(), Some("opengauss" | "gaussdb"))
|
||||
}
|
||||
|
||||
fn is_cloudberry_config(config: &ConnectionConfig) -> bool {
|
||||
matches!(config.driver_profile.as_deref(), Some("cloudberry"))
|
||||
}
|
||||
|
||||
fn is_doris_family_config(config: &ConnectionConfig) -> bool {
|
||||
matches!(config.db_type, DatabaseType::Doris | DatabaseType::StarRocks | DatabaseType::ManticoreSearch)
|
||||
|| matches!(config.driver_profile.as_deref(), Some("doris" | "selectdb" | "starrocks" | "manticoresearch"))
|
||||
|
||||
Reference in new issue
Block a user