feat(grid): support composite unique reference keys

This commit is contained in:
zipg authored and GitHub committed 2026-08-27 16:00:00 +08:00
1 parent cf03de122a
commit eb0994e980
19 files changed
+219 -56

No files matched your search

+18
View File
@@ -434,6 +434,24 @@ pub async fn list_reference_key_columns(
dbx_core::schema::list_reference_key_columns_core(&state, &connection_id, &database, &schema, &table).await
}
#[tauri::command]
pub async fn list_reference_keys(
state: State<'_, Arc<AppState>>,
connection_id: String,
database: String,
schema: String,
table: String,
catalog: Option<String>,
) -> Result<Vec<dbx_core::schema::ReferenceKeyInfo>, String> {
if let Some(catalog) = external_doris_catalog(&state, &connection_id, catalog.as_deref()).await {
let indexes =
dbx_core::schema::list_doris_catalog_indexes_core(&state, &connection_id, &catalog, &database, &table)
.await?;
return Ok(dbx_core::schema::reference_keys_from_indexes(&indexes));
}
dbx_core::schema::list_reference_keys_core(&state, &connection_id, &database, &schema, &table).await
}
#[tauri::command]
pub async fn list_foreign_keys(
state: State<'_, Arc<AppState>>,
+1
View File
@@ -1925,6 +1925,7 @@ pub fn run() {
commands::schema::get_sqlserver_column_metadata,
commands::schema::list_indexes,
commands::schema::list_reference_key_columns,
commands::schema::list_reference_keys,
commands::schema::list_foreign_keys,
commands::schema::list_triggers,
commands::schema::list_constraints,