feat: 数据库表操作显示表size&其他小优化

This commit is contained in:
meilin.huang
2023-11-02 12:46:21 +08:00
parent 3155380f16
commit 37026f3269
26 changed files with 163 additions and 213 deletions

View File

@@ -131,6 +131,11 @@ func (r *Redis) TtlKey(rc *req.Ctx) {
}
}
func (r *Redis) MemoryUsage(rc *req.Ctx) {
ri, key := r.checkKeyAndGetRedisConn(rc)
rc.ResData = ri.GetCmdable().MemoryUsage(context.Background(), key).Val()
}
func (r *Redis) DeleteKey(rc *req.Ctx) {
ri, key := r.checkKeyAndGetRedisConn(rc)
rc.ReqParam = collx.Kvs("redis", ri.Info, "key", key)