feat(redis): show key types in browser list
This commit is contained in:
parent
62aeae5de4
commit
62130938cf
|
|
@ -560,11 +560,11 @@ describe("RedisKeyBrowser scope changes", () => {
|
|||
const browser = mountScopedBrowser();
|
||||
await settle();
|
||||
|
||||
expect(mocks.redisScanKeysBatch).toHaveBeenCalledWith("connection", 0, 0, "*", 100, 8, false);
|
||||
expect(mocks.redisScanKeysBatch).toHaveBeenCalledWith("connection", 0, 0, "*", 100, 8, true);
|
||||
|
||||
await browser.setScope("connection", 1);
|
||||
|
||||
expect(mocks.redisScanKeysBatch).toHaveBeenCalledWith("connection", 1, 0, "*", 100, 8, false);
|
||||
expect(mocks.redisScanKeysBatch).toHaveBeenCalledWith("connection", 1, 0, "*", 100, 8, true);
|
||||
previousDatabase.resolve({
|
||||
cursor: 0,
|
||||
keys: [{ key_display: "db0-key", key_raw: "ZGIwLWtleQ==", key_type: "string", ttl: -1 }],
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ async function fetchScanPage(requestId = searchRequestId): Promise<RedisScanResu
|
|||
return { cursor, keys: [], total_keys: totalKeys };
|
||||
}
|
||||
const iterations = Math.min(iterationsPerCall, maxIterations - completedIterations);
|
||||
const result = await api.redisScanKeysBatch(props.connectionId, props.db, cursor, effectivePattern.value, pageSize, iterations, false);
|
||||
const result = await api.redisScanKeysBatch(props.connectionId, props.db, cursor, effectivePattern.value, pageSize, iterations, true);
|
||||
if (totalKeys === 0) totalKeys = result.total_keys;
|
||||
if (result.keys.length > 0 || result.cursor === 0) {
|
||||
return { ...result, total_keys: totalKeys };
|
||||
|
|
|
|||
Loading…
Reference in New Issue