Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
folospace committed Jul 5, 2024
1 parent fa714d7 commit 0d914f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions orm/query_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ func (q *Query[T]) generateUpdateStr(updates []updateColumn, bindings *[]any) st
temp = column + " = values(`" + strings.Trim(column[dotIndex+1:], "`") + "`)"
} else {
targetColumn, err := q.parseColumn(v.val)
if err != nil {
q.setErr(err)
return ""
if err == nil {
temp = column + " = " + targetColumn
} else {
//q.setErr(err)
//return ""
temp = column + " = ?"
*bindings = append(*bindings, v.val)
}
temp = column + " = " + targetColumn
}
} else {
temp = column + " = ?"
Expand Down

0 comments on commit 0d914f1

Please sign in to comment.