feat(elasticsearch): add mapping, settings, stats and clear actions
This commit is contained in:
1 parent
a84cb637ba
commit
8f3134dce8
32 files changed
+1262
-3
No files matched your search
@@ -132,6 +132,26 @@ pub async fn elasticsearch_count_documents(
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn elasticsearch_get_index_metadata(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
index: String,
|
||||
kind: dbx_core::document_ops::ElasticsearchIndexMetadataKind,
|
||||
) -> Result<serde_json::Value, String> {
|
||||
dbx_core::document_ops::elasticsearch_get_index_metadata_core(&state, &connection_id, &index, kind).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn elasticsearch_delete_all_documents(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
index: String,
|
||||
) -> Result<dbx_core::db::elasticsearch_driver::ElasticsearchDeleteByQueryResult, String> {
|
||||
ensure_connection_writable(&state, &connection_id, "Delete all documents").await?;
|
||||
dbx_core::document_ops::elasticsearch_delete_all_documents_core(&state, &connection_id, &index).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn document_insert_document(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
@@ -2198,6 +2198,8 @@ pub fn run() {
|
||||
commands::document_cmd::document_count_documents,
|
||||
commands::document_cmd::dynamodb_describe_table,
|
||||
commands::document_cmd::elasticsearch_count_documents,
|
||||
commands::document_cmd::elasticsearch_get_index_metadata,
|
||||
commands::document_cmd::elasticsearch_delete_all_documents,
|
||||
commands::document_cmd::document_list_gridfs_buckets,
|
||||
commands::document_cmd::document_create_gridfs_bucket,
|
||||
commands::document_cmd::document_delete_gridfs_bucket,
|
||||
|
||||
Reference in new issue
Block a user