feat(mongodb): support safe index editing
This commit is contained in:
1 parent
880d635961
commit
799bdd1a62
27 files changed
+2754
-10
No files matched your search
@@ -321,6 +321,17 @@ pub async fn mongo_distinct(
|
||||
.await
|
||||
}
|
||||
|
||||
/// Read-only listing of a collection's indexes with their full MongoDB options.
|
||||
#[tauri::command]
|
||||
pub async fn mongo_list_index_specs(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
database: String,
|
||||
collection: String,
|
||||
) -> Result<Vec<dbx_core::db::mongo_driver::MongoIndexSpec>, String> {
|
||||
dbx_core::mongo_ops::mongo_list_index_specs_core(&state, &connection_id, &database, &collection).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn mongo_create_index(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -2000,6 +2000,7 @@ pub fn run() {
|
||||
commands::mongo_cmd::mongo_collection_stats,
|
||||
commands::mongo_cmd::mongo_aggregate_documents,
|
||||
commands::mongo_cmd::mongo_distinct,
|
||||
commands::mongo_cmd::mongo_list_index_specs,
|
||||
commands::mongo_cmd::mongo_create_index,
|
||||
commands::mongo_cmd::mongo_create_user,
|
||||
commands::mongo_cmd::mongo_run_command,
|
||||
|
||||
Reference in new issue
Block a user