feat(history): add query history filters
This commit is contained in:
1 parent
1c7576537a
commit
d16ba82d5a
22 files changed
+1324
-40
No files matched your search
@@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||
use tauri::State;
|
||||
|
||||
use super::connection::AppState;
|
||||
pub use dbx_core::history::HistoryEntry;
|
||||
pub use dbx_core::history::{HistoryConnectionOption, HistoryEntry, HistorySearchRequest, HistorySearchResult};
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn save_history(state: State<'_, Arc<AppState>>, entry: HistoryEntry) -> Result<(), String> {
|
||||
@@ -19,6 +19,21 @@ pub async fn load_history(
|
||||
state.storage.load_history_entries(limit, offset, activity_kind).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn search_history(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
request: HistorySearchRequest,
|
||||
) -> Result<HistorySearchResult, String> {
|
||||
state.storage.search_history_entries(request).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn load_history_connection_options(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
) -> Result<Vec<HistoryConnectionOption>, String> {
|
||||
state.storage.load_history_connection_options().await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn clear_history(state: State<'_, Arc<AppState>>) -> Result<(), String> {
|
||||
state.storage.clear_history().await
|
||||
|
||||
Reference in new issue
Block a user