This commit is contained in:
demoManito 2023-10-20 20:48:53 +08:00
parent 294255c11b
commit 685ece80d4
2 changed files with 5 additions and 2 deletions

View File

@ -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})
}
}

View File

@ -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},