1. 优化性能:减少func (session *Session) slice2Bean方法中的strings.ToLower调用次数以及减少map创建和访问次数(见工单 https://gitea.com/xorm/xorm/issues/2243)

2. 新增SetDefaultJSONHandler方法,用于用户自行设置DefaultJSONHandler(见工单 https://gitea.com/xorm/xorm/issues/2129)
This commit is contained in:
洪坤安 2023-04-19 17:06:55 +08:00
parent 7eef505e59
commit 064cd596c9
1 changed files with 5 additions and 3 deletions

View File

@ -221,9 +221,11 @@ func ParseColumnsSchema(fieldNames []string, types []*sql.ColumnType, table *sch
field.TempIndex = idx
}
err := columnsSchema.ParseTableSchema(table)
if err != nil {
return nil, err
if table != nil {
err := columnsSchema.ParseTableSchema(table)
if err != nil {
return nil, err
}
}
return &columnsSchema, nil