fix(redis): batch SCAN server-side to reduce fetch-all latency
This commit is contained in:
1 parent
08fb5bbf4d
commit
ab5bd1dd25
10 files changed
+204
-49
No files matched your search
@@ -26,6 +26,20 @@ pub async fn redis_scan_keys(
|
||||
dbx_core::redis_ops::redis_scan_keys_core(&state, &connection_id, db, cursor, &pattern, count).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn redis_scan_keys_batch(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
connection_id: String,
|
||||
db: u32,
|
||||
cursor: u64,
|
||||
pattern: String,
|
||||
count: usize,
|
||||
max_iterations: usize,
|
||||
) -> Result<RedisScanResult, String> {
|
||||
dbx_core::redis_ops::redis_scan_keys_batch_core(&state, &connection_id, db, cursor, &pattern, count, max_iterations)
|
||||
.await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn redis_scan_values(
|
||||
state: State<'_, Arc<AppState>>,
|
||||
|
||||
Reference in new issue
Block a user