feat(redis): support score sorting and inline sorted-set editing
This commit is contained in:
20 files changed
+621
-102
No files matched your search
@@ -413,6 +413,7 @@ export const redisSetAdd = forward("redisSetAdd");
|
||||
export const redisSetRemove = forward("redisSetRemove");
|
||||
export const redisZadd = forward("redisZadd");
|
||||
export const redisZrem = forward("redisZrem");
|
||||
export const redisZsetUpdate = forward("redisZsetUpdate");
|
||||
export const redisStreamAdd = forward("redisStreamAdd");
|
||||
export const redisJsonSet = forward("redisJsonSet");
|
||||
export const redisCheckJsonModule = forward("redisCheckJsonModule");
|
||||
|
||||
@@ -2416,6 +2416,10 @@ export async function redisZrem(connectionId: string, db: number, keyRaw: string
|
||||
return post("/api/redis/zrem", { connectionId, db, keyRaw, member });
|
||||
}
|
||||
|
||||
export async function redisZsetUpdate(connectionId: string, db: number, keyRaw: string, originalMember: string, expectedScore: string, member: string, score: string): Promise<boolean> {
|
||||
return post("/api/redis/zset-update", { connectionId, db, keyRaw, originalMember, expectedScore, member, score });
|
||||
}
|
||||
|
||||
export async function redisStreamAdd(connectionId: string, db: number, keyRaw: string, entryId: string, fields: [string, string][], ttl?: number): Promise<void> {
|
||||
return post("/api/redis/stream-add", {
|
||||
connectionId,
|
||||
@@ -2465,7 +2469,7 @@ export async function redisExecuteCommand(connectionId: string, db: number, comm
|
||||
});
|
||||
}
|
||||
|
||||
export async function redisLoadMore(connectionId: string, db: number, keyRaw: string, keyType: string, cursor: number, count: number, filter?: string): Promise<RedisCollectionPage> {
|
||||
export async function redisLoadMore(connectionId: string, db: number, keyRaw: string, keyType: string, cursor: number, count: number, filter?: string, sortDirection?: "asc" | "desc"): Promise<RedisCollectionPage> {
|
||||
return post("/api/redis/load-more", {
|
||||
connectionId,
|
||||
db,
|
||||
@@ -2474,6 +2478,7 @@ export async function redisLoadMore(connectionId: string, db: number, keyRaw: st
|
||||
cursor,
|
||||
count,
|
||||
filter,
|
||||
sortDirection,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2231,6 +2231,10 @@ export async function redisZrem(connectionId: string, db: number, keyRaw: string
|
||||
return invoke("redis_zrem", { connectionId, db, keyRaw, member });
|
||||
}
|
||||
|
||||
export async function redisZsetUpdate(connectionId: string, db: number, keyRaw: string, originalMember: string, expectedScore: string, member: string, score: string): Promise<boolean> {
|
||||
return invoke("redis_zset_update", { connectionId, db, keyRaw, originalMember, expectedScore, member, score });
|
||||
}
|
||||
|
||||
export async function redisStreamAdd(connectionId: string, db: number, keyRaw: string, entryId: string, fields: [string, string][], ttl?: number): Promise<void> {
|
||||
return invoke("redis_stream_add", {
|
||||
connectionId,
|
||||
@@ -2275,7 +2279,7 @@ export async function redisExecuteCommand(connectionId: string, db: number, comm
|
||||
});
|
||||
}
|
||||
|
||||
export async function redisLoadMore(connectionId: string, db: number, keyRaw: string, keyType: string, cursor: number, count: number, filter?: string): Promise<RedisCollectionPage> {
|
||||
export async function redisLoadMore(connectionId: string, db: number, keyRaw: string, keyType: string, cursor: number, count: number, filter?: string, sortDirection?: "asc" | "desc"): Promise<RedisCollectionPage> {
|
||||
return invoke("redis_load_more", {
|
||||
connectionId,
|
||||
db,
|
||||
@@ -2284,6 +2288,7 @@ export async function redisLoadMore(connectionId: string, db: number, keyRaw: st
|
||||
cursor,
|
||||
count,
|
||||
filter,
|
||||
sortDirection,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user