[BUG] Update statement reserved word not escaped

Update statement, using MODEL struct, now generates escaped SQL identifier if column name is reserved word.
This commit is contained in:
go-jet 2021-05-09 17:17:14 +02:00
parent 063b17ca05
commit 256be8a406
3 changed files with 41 additions and 12 deletions

View file

@ -308,7 +308,7 @@ func (s *SetClause) Serialize(statementType StatementType, out *SQLBuilder, opti
panic("jet: nil column in columns list for SET clause")
}
out.WriteString(column.Name())
out.WriteIdentifier(column.Name())
out.WriteString(" = ")