fix: key deletion operation was incomplete (#348)
This commit is contained in:
parent
aa3383db43
commit
cb428747e2
|
@ -296,6 +296,9 @@ export class RedisServerState {
|
|||
removeKeyNode(key, isLayer) {
|
||||
if (isLayer === true) {
|
||||
this.deleteChildrenKeyNodes(key)
|
||||
} else {
|
||||
const nodeKey = `${ConnectionType.RedisValue}/${key}`
|
||||
this.nodeMap.delete(nodeKey)
|
||||
}
|
||||
|
||||
const dbRoot = this.getRoot()
|
||||
|
|
|
@ -708,17 +708,19 @@ const useBrowserStore = defineStore('browser', {
|
|||
}
|
||||
let match = prefix
|
||||
const separator = this.getSeparator(server)
|
||||
if (!isEmpty(match)) {
|
||||
if (!endsWith(match, separator)) {
|
||||
match += separator + '*'
|
||||
} else {
|
||||
match += '*'
|
||||
}
|
||||
}
|
||||
// FIXME: ignore original match pattern due to redis not support combination matching
|
||||
const { match: originMatch, type: keyType, exact } = this.getKeyFilter(server)
|
||||
const { keys, maxKeys, success } = await this._loadKeys({
|
||||
server,
|
||||
db,
|
||||
match: originMatch,
|
||||
match: match || originMatch,
|
||||
exact: false,
|
||||
matchType: keyType,
|
||||
all: true,
|
||||
|
|
Loading…
Reference in New Issue