fix(postgres): include owner and grants in displayed DDL
This commit is contained in:
13 files changed
+479
-12
No files matched your search
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user