mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-10-17 12:40:41 +08:00
fix: the deletion result might be incorrect
This commit is contained in:
@@ -504,8 +504,8 @@ func (b *browserService) LoadNextKeys(connName string, db int, match, keyType st
|
||||
return
|
||||
}
|
||||
|
||||
// LoadAllKeys load all keys
|
||||
func (b *browserService) LoadAllKeys(connName string, db int, match, keyType string) (resp types.JSResp) {
|
||||
// LoadNextAllKeys load next all keys
|
||||
func (b *browserService) LoadNextAllKeys(connName string, db int, match, keyType string) (resp types.JSResp) {
|
||||
item, err := b.getRedisClient(connName, db)
|
||||
if err != nil {
|
||||
resp.Msg = err.Error()
|
||||
@@ -530,6 +530,28 @@ func (b *browserService) LoadAllKeys(connName string, db int, match, keyType str
|
||||
return
|
||||
}
|
||||
|
||||
// LoadAllKeys load all keys
|
||||
func (b *browserService) LoadAllKeys(connName string, db int, match, keyType string) (resp types.JSResp) {
|
||||
item, err := b.getRedisClient(connName, db)
|
||||
if err != nil {
|
||||
resp.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
client, ctx := item.client, item.ctx
|
||||
keys, _, err := b.scanKeys(ctx, client, match, keyType, 0, 0)
|
||||
if err != nil {
|
||||
resp.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
resp.Success = true
|
||||
resp.Data = map[string]any{
|
||||
"keys": keys,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (b *browserService) GetKeyType(param types.KeySummaryParam) (resp types.JSResp) {
|
||||
item, err := b.getRedisClient(param.Server, param.DB)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user