mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
upgrade xorm to v1.0.6 (#14246)
This commit is contained in:
4
vendor/xorm.io/xorm/internal/statements/statement.go
generated
vendored
4
vendor/xorm.io/xorm/internal/statements/statement.go
generated
vendored
@@ -704,7 +704,7 @@ func (statement *Statement) buildConds2(table *schemas.Table, bean interface{},
|
||||
col.SQLType.IsBlob() || col.SQLType.Name == schemas.TimeStampz) {
|
||||
continue
|
||||
}
|
||||
if col.SQLType.IsJson() {
|
||||
if col.IsJSON {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -813,7 +813,7 @@ func (statement *Statement) buildConds2(table *schemas.Table, bean interface{},
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
if col.SQLType.IsJson() {
|
||||
if col.IsJSON {
|
||||
if col.SQLType.IsText() {
|
||||
bytes, err := json.DefaultJSONHandler.Marshal(fieldValue.Interface())
|
||||
if err != nil {
|
||||
|
2
vendor/xorm.io/xorm/internal/statements/update.go
generated
vendored
2
vendor/xorm.io/xorm/internal/statements/update.go
generated
vendored
@@ -204,7 +204,7 @@ func (statement *Statement) BuildUpdates(tableValue reflect.Value,
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
if !col.SQLType.IsJson() {
|
||||
if !col.IsJSON {
|
||||
table, err := statement.tagParser.ParseWithCache(fieldValue)
|
||||
if err != nil {
|
||||
val = fieldValue.Interface()
|
||||
|
2
vendor/xorm.io/xorm/internal/statements/values.go
generated
vendored
2
vendor/xorm.io/xorm/internal/statements/values.go
generated
vendored
@@ -86,7 +86,7 @@ func (statement *Statement) Value2Interface(col *schemas.Column, fieldValue refl
|
||||
return t.Float64, nil
|
||||
}
|
||||
|
||||
if !col.SQLType.IsJson() {
|
||||
if !col.IsJSON {
|
||||
// !<winxxp>! 增加支持driver.Valuer接口的结构,如sql.NullString
|
||||
if v, ok := fieldValue.Interface().(driver.Valuer); ok {
|
||||
return v.Value()
|
||||
|
Reference in New Issue
Block a user