feat(data-grid): support manual reference display values
This commit is contained in:
24 files changed
+893
-90
No files matched your search
@@ -395,6 +395,24 @@ pub async fn list_indexes(
|
||||
dbx_core::schema::list_indexes_core(&state, &connection_id, &database, &schema, &table).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_reference_key_columns(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
schema: String,
|
||||
table: String,
|
||||
catalog: Option<String>,
|
||||
) -> Result<Vec<String>, 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_key_columns_from_indexes(&indexes));
|
||||
}
|
||||
dbx_core::schema::list_reference_key_columns_core(&state, &connection_id, &database, &schema, &table).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn list_foreign_keys(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -1677,6 +1677,7 @@ pub fn run() {
|
||||
commands::schema::get_all_columns,
|
||||
commands::schema::get_sqlserver_column_metadata,
|
||||
commands::schema::list_indexes,
|
||||
commands::schema::list_reference_key_columns,
|
||||
commands::schema::list_foreign_keys,
|
||||
commands::schema::list_triggers,
|
||||
commands::schema::list_constraints,
|
||||
|
||||
Reference in new issue
Block a user