From dd63ff21ef9737321de68be3c02ecd417bcbfcc4 Mon Sep 17 00:00:00 2001 From: xielong Date: Sun, 6 Oct 2024 17:19:55 +0800 Subject: [PATCH] fix update onConflict --- exp/update.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exp/update.go b/exp/update.go index 9197d82..0488760 100644 --- a/exp/update.go +++ b/exp/update.go @@ -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: