feat(redis): support renaming keys

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-18 15:23:08 +08:00
1 parent 61103523de
commit 168f2a472b
21 files changed
+297 -2

No files matched your search

+12
View File
@@ -175,6 +175,18 @@ pub async fn redis_delete_key(
dbx_core::redis_ops::redis_delete_key_in_db_core(&state, &connection_id, db, &key_raw).await
}
#[tauri::command]
pub async fn redis_rename_key(
state: State<'_, Arc<AppState>>,
connection_id: String,
db: u32,
key_raw: String,
new_key_raw: String,
) -> Result<(), String> {
ensure_connection_writable(&state, &connection_id, "RENAMENX").await?;
dbx_core::redis_ops::redis_rename_key_in_db_core(&state, &connection_id, db, &key_raw, &new_key_raw).await
}
#[tauri::command]
pub async fn redis_hash_set(
state: State<'_, Arc<AppState>>,