解决dbm使用mysql返回base64编码后的

This commit is contained in:
junleea 2025-10-24 19:48:43 +08:00
parent 0bf94a0c2b
commit 1573353f49
1 changed files with 6 additions and 1 deletions

View File

@ -247,8 +247,13 @@ func RunSQLWithOrder(sql string, db_ *gorm.DB) (result proto.SQLResult, err erro
// 将当前行数据存入 map便于按列名访问
rowMap := make(map[string]interface{})
for i, col := range columns {
val := values[i]
if b, ok := val.([]byte); ok {
rowMap[col] = string(b)
} else {
rowMap[col] = values[i]
}
}
result.Rows = append(result.Rows, rowMap)
}