mirror of https://github.com/go-gorm/gorm.git
fix
This commit is contained in:
parent
685ece80d4
commit
b2ff96b2e2
|
@ -19,20 +19,15 @@ func (set Set) Build(builder Builder) {
|
|||
if len(set) > 0 {
|
||||
for idx, assignment := range set {
|
||||
if idx > 0 {
|
||||
builder.WriteByte(',')
|
||||
builder.WriteByte(' ')
|
||||
builder.WriteString(", ")
|
||||
}
|
||||
builder.WriteQuoted(assignment.Column)
|
||||
builder.WriteByte(' ')
|
||||
builder.WriteByte('=')
|
||||
builder.WriteByte(' ')
|
||||
builder.WriteString(" = ")
|
||||
builder.AddVar(builder, assignment.Value)
|
||||
}
|
||||
} else {
|
||||
builder.WriteQuoted(Column{Name: PrimaryKey})
|
||||
builder.WriteByte(' ')
|
||||
builder.WriteByte('=')
|
||||
builder.WriteByte(' ')
|
||||
builder.WriteString(" = ")
|
||||
builder.WriteQuoted(Column{Name: PrimaryKey})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue