feat(grid): support composite unique reference keys
This commit is contained in:
19 files changed
+219
-56
No files matched your search
@@ -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>>,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user