fix(postgres): include owner and grants in displayed DDL

This commit is contained in:
zipg authored and GitHub committed 2026-07-27 21:45:35 +08:00
1 parent a5eb6fd1fa
commit 1d671ca698
13 files changed
+479 -12

No files matched your search

+7 -1
View File
@@ -431,12 +431,18 @@ pub async fn get_table_ddl(
table: String,
object_type: Option<db::ObjectSourceKind>,
catalog: Option<String>,
include_postgres_access: Option<bool>,
) -> Result<String, String> {
if let Some(catalog) = external_doris_catalog(&state, &connection_id, catalog.as_deref()).await {
return dbx_core::schema::get_doris_catalog_table_ddl_core(&state, &connection_id, &catalog, &database, &table)
.await;
}
dbx_core::schema::get_table_ddl_core(&state, &connection_id, &database, &schema, &table, object_type).await
if include_postgres_access.unwrap_or(false) {
dbx_core::schema::get_table_display_ddl_core(&state, &connection_id, &database, &schema, &table, object_type)
.await
} else {
dbx_core::schema::get_table_ddl_core(&state, &connection_id, &database, &schema, &table, object_type).await
}
}
#[tauri::command]