diff --git a/crates/dbx-core/src/db/clickhouse_driver.rs b/crates/dbx-core/src/db/clickhouse_driver.rs index 6679d67194..0045ff1d72 100644 --- a/crates/dbx-core/src/db/clickhouse_driver.rs +++ b/crates/dbx-core/src/db/clickhouse_driver.rs @@ -96,7 +96,11 @@ pub async fn list_tables(client: &ChClient, database: &str) -> Result Result, St .map(|r| TableInfo { name: r.first().cloned().unwrap_or_default(), table_type: r.get(1).cloned().unwrap_or_else(|| "TABLE".to_string()), + comment: None, }) .collect()) } diff --git a/crates/dbx-core/src/db/gaussdb_driver.rs b/crates/dbx-core/src/db/gaussdb_driver.rs index bf833b51b8..bd99c150e8 100644 --- a/crates/dbx-core/src/db/gaussdb_driver.rs +++ b/crates/dbx-core/src/db/gaussdb_driver.rs @@ -78,6 +78,7 @@ pub async fn list_tables(client: &mut GaussdbClient, schema: &str) -> Result Result Result("name"), table_type: if t == "view" { "VIEW".to_string() } else { "BASE TABLE".to_string() }, + comment: None, } }) .collect()) diff --git a/crates/dbx-core/src/db/sqlserver.rs b/crates/dbx-core/src/db/sqlserver.rs index fa05f6f2e9..db7443fe0a 100644 --- a/crates/dbx-core/src/db/sqlserver.rs +++ b/crates/dbx-core/src/db/sqlserver.rs @@ -106,6 +106,7 @@ pub async fn list_tables(client: &mut SqlServerClient, schema: &str) -> Result(0).unwrap_or("").to_string(), table_type: row.get::<&str, _>(1).unwrap_or("BASE TABLE").to_string(), + comment: None, }) .collect()) } diff --git a/crates/dbx-core/src/schema.rs b/crates/dbx-core/src/schema.rs index 591481ef2e..5d5ec40deb 100644 --- a/crates/dbx-core/src/schema.rs +++ b/crates/dbx-core/src/schema.rs @@ -9,7 +9,9 @@ pub fn duckdb_query_tables(con: &duckdb::Connection) -> Result(0)?, table_type: row.get::<_, String>(1)? })) + .query_map([], |row| { + Ok(db::TableInfo { name: row.get::<_, String>(0)?, table_type: row.get::<_, String>(1)?, comment: None }) + }) .map_err(|e| e.to_string())?; Ok(rows.filter_map(|r| r.ok()).collect()) }