From 685ece80d47b0e97ac6c7d57087422efc2a48fd8 Mon Sep 17 00:00:00 2001 From: demoManito <1430482733@qq.com> Date: Fri, 20 Oct 2023 20:48:53 +0800 Subject: [PATCH] fix test --- clause/set.go | 6 +++++- clause/set_test.go | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clause/set.go b/clause/set.go index 2971f4211..5c281d96d 100644 --- a/clause/set.go +++ b/clause/set.go @@ -1,6 +1,8 @@ package clause -import "sort" +import ( + "sort" +) type Set []Assignment @@ -28,7 +30,9 @@ func (set Set) Build(builder Builder) { } } else { builder.WriteQuoted(Column{Name: PrimaryKey}) + builder.WriteByte(' ') builder.WriteByte('=') + builder.WriteByte(' ') builder.WriteQuoted(Column{Name: PrimaryKey}) } } diff --git a/clause/set_test.go b/clause/set_test.go index 8e97ac6fe..8232c3e8a 100644 --- a/clause/set_test.go +++ b/clause/set_test.go @@ -35,7 +35,6 @@ func TestSet(t *testing.T) { { []clause.Interface{ clause.Update{}, - clause.Set([]clause.Assignment{{clause.PrimaryColumn, 1}}), clause.Set([]clause.Assignment{ {clause.Column{Name: "name"}, "jinzhu"}, {clause.Column{Name: "age"}, 18},