Skip to content

Commit

Permalink
fix update onConflict
Browse files Browse the repository at this point in the history
  • Loading branch information
XIELongDragon committed Oct 6, 2024
1 parent aba6c34 commit dd63ff2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exp/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ func NewUpdateExpressions(tagName string, update interface{}) (updates []UpdateE
updates = append(updates, us...)
return updates, nil
}

if u, ok := update.(UpdateExpression); ok {
updates = append(updates, u)
return updates, nil
}

updateValue := reflect.Indirect(reflect.ValueOf(update))
switch updateValue.Kind() {
case reflect.Map:
Expand Down

0 comments on commit dd63ff2

Please sign in to comment.