mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
feat: 数据库查询结果导出&其他小问题修复
This commit is contained in:
@@ -589,7 +589,7 @@ func (mm *MysqlMetadata) GetTableInfos() []map[string]interface{} {
|
||||
|
||||
// 获取表索引信息
|
||||
func (mm *MysqlMetadata) GetTableIndex(tableName string) []map[string]interface{} {
|
||||
_, res, _ := mm.di.SelectData(MYSQL_INDEX_INFO)
|
||||
_, res, _ := mm.di.SelectData(fmt.Sprintf(MYSQL_INDEX_INFO, tableName))
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ func (pm *PgsqlMetadata) GetTableInfos() []map[string]interface{} {
|
||||
|
||||
// 获取表索引信息
|
||||
func (pm *PgsqlMetadata) GetTableIndex(tableName string) []map[string]interface{} {
|
||||
_, res, _ := pm.di.SelectData(PGSQL_INDEX_INFO)
|
||||
_, res, _ := pm.di.SelectData(fmt.Sprintf(PGSQL_INDEX_INFO, tableName))
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ func newProjectApp(projectRepo repository.Project,
|
||||
machineApp: machineApp,
|
||||
redisApp: redisApp,
|
||||
dbApp: dbApp,
|
||||
mongoApp: mongoApp,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ func (r *Redis) RedisInfo(rc *ctx.ReqCtx) {
|
||||
var err error
|
||||
|
||||
ctx := context.Background()
|
||||
if ri.Mode == "" || ri.Mode == entity.RedisModeStandalone {
|
||||
if ri.Mode == "" || ri.Mode == entity.RedisModeStandalone || ri.Mode == entity.RedisModeSentinel {
|
||||
res, err = ri.Cli.Info(ctx).Result()
|
||||
} else if ri.Mode == entity.RedisModeCluster {
|
||||
host := rc.GinCtx.Query("host")
|
||||
|
||||
Reference in New Issue
Block a user