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

+1
View File
@@ -443,6 +443,7 @@ export const redisGetStreamConsumers = forward("redisGetStreamConsumers");
export const redisGetStreamPending = forward("redisGetStreamPending");
export const redisSetString = forward("redisSetString");
export const redisDeleteKey = forward("redisDeleteKey");
export const redisRenameKey = forward("redisRenameKey");
export const redisHashSet = forward("redisHashSet");
export const redisHashDel = forward("redisHashDel");
export const redisHashFieldSetTtl = forward("redisHashFieldSetTtl");
+4
View File
@@ -2535,6 +2535,10 @@ export async function redisDeleteKey(connectionId: string, db: number, keyRaw: s
return post("/api/redis/delete-key", { connectionId, db, keyRaw });
}
export async function redisRenameKey(connectionId: string, db: number, keyRaw: string, newKeyRaw: string): Promise<void> {
return post("/api/redis/rename-key", { connectionId, db, keyRaw, newKeyRaw });
}
export async function redisHashSet(connectionId: string, db: number, keyRaw: string, field: string, value: string, ttl?: number): Promise<void> {
return post("/api/redis/hash-set", {
connectionId,
+4
View File
@@ -2342,6 +2342,10 @@ export async function redisDeleteKey(connectionId: string, db: number, keyRaw: s
return invoke("redis_delete_key", { connectionId, db, keyRaw });
}
export async function redisRenameKey(connectionId: string, db: number, keyRaw: string, newKeyRaw: string): Promise<void> {
return invoke("redis_rename_key", { connectionId, db, keyRaw, newKeyRaw });
}
export async function redisHashSet(connectionId: string, db: number, keyRaw: string, field: string, value: string, ttl?: number): Promise<void> {
return invoke("redis_hash_set", {
connectionId,