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