feat(redis): view and edit Hash field expiry (HEXPIRE/HTTL/HPERSIST)
This commit is contained in:
12 files changed
+583
-16
No files matched your search
@@ -414,6 +414,8 @@ export const redisSetString = forward("redisSetString");
|
||||
export const redisDeleteKey = forward("redisDeleteKey");
|
||||
export const redisHashSet = forward("redisHashSet");
|
||||
export const redisHashDel = forward("redisHashDel");
|
||||
export const redisHashFieldSetTtl = forward("redisHashFieldSetTtl");
|
||||
export const redisHashFieldSetExpireAt = forward("redisHashFieldSetExpireAt");
|
||||
export const redisListPush = forward("redisListPush");
|
||||
export const redisListSet = forward("redisListSet");
|
||||
export const redisListRemove = forward("redisListRemove");
|
||||
|
||||
@@ -2387,6 +2387,14 @@ export async function redisHashDel(connectionId: string, db: number, keyRaw: str
|
||||
return post("/api/redis/hash-del", { connectionId, db, keyRaw, field });
|
||||
}
|
||||
|
||||
export async function redisHashFieldSetTtl(connectionId: string, db: number, keyRaw: string, field: string, ttl: number): Promise<void> {
|
||||
return post("/api/redis/hash-field-set-ttl", { connectionId, db, keyRaw, field, ttl });
|
||||
}
|
||||
|
||||
export async function redisHashFieldSetExpireAt(connectionId: string, db: number, keyRaw: string, field: string, expireAt: number): Promise<void> {
|
||||
return post("/api/redis/hash-field-set-expire-at", { connectionId, db, keyRaw, field, expireAt });
|
||||
}
|
||||
|
||||
export async function redisListPush(connectionId: string, db: number, keyRaw: string, value: string, ttl?: number): Promise<void> {
|
||||
return post("/api/redis/list-push", { connectionId, db, keyRaw, value, ttl });
|
||||
}
|
||||
|
||||
@@ -2022,6 +2022,7 @@ export interface RedisSetItem {
|
||||
export interface RedisHashItem {
|
||||
field: RedisBlob;
|
||||
value: RedisBlob;
|
||||
field_ttl?: number;
|
||||
}
|
||||
|
||||
export interface RedisZsetItem {
|
||||
@@ -2235,6 +2236,14 @@ export async function redisHashDel(connectionId: string, db: number, keyRaw: str
|
||||
return invoke("redis_hash_del", { connectionId, db, keyRaw, field });
|
||||
}
|
||||
|
||||
export async function redisHashFieldSetTtl(connectionId: string, db: number, keyRaw: string, field: string, ttl: number): Promise<void> {
|
||||
return invoke("redis_hash_field_set_ttl", { connectionId, db, keyRaw, field, ttl });
|
||||
}
|
||||
|
||||
export async function redisHashFieldSetExpireAt(connectionId: string, db: number, keyRaw: string, field: string, expireAt: number): Promise<void> {
|
||||
return invoke("redis_hash_field_set_expire_at", { connectionId, db, keyRaw, field, expireAt });
|
||||
}
|
||||
|
||||
export async function redisListPush(connectionId: string, db: number, keyRaw: string, value: string, ttl?: number): Promise<void> {
|
||||
return invoke("redis_list_push", { connectionId, db, keyRaw, value, ttl });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user