解决dbm使用mysql返回base64编码后的
This commit is contained in:
parent
0bf94a0c2b
commit
1573353f49
|
|
@ -247,7 +247,12 @@ func RunSQLWithOrder(sql string, db_ *gorm.DB) (result proto.SQLResult, err erro
|
|||
// 将当前行数据存入 map(便于按列名访问)
|
||||
rowMap := make(map[string]interface{})
|
||||
for i, col := range columns {
|
||||
rowMap[col] = values[i]
|
||||
val := values[i]
|
||||
if b, ok := val.([]byte); ok {
|
||||
rowMap[col] = string(b)
|
||||
} else {
|
||||
rowMap[col] = values[i]
|
||||
}
|
||||
}
|
||||
result.Rows = append(result.Rows, rowMap)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue