Skip to content

Commit

Permalink
Correct the way update is rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
perrito666 committed Jun 26, 2018
1 parent 91057ad commit bd7e1fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions db/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,8 @@ func (ec *ExpresionChain) render(raw bool) (string, []interface{}, error) {
if len(expresion) == 0 {
return "", nil, errors.Errorf("empty update expresion")
}
query = fmt.Sprintf("UPDATE ? SET (%s)",
ec.mainOperation.expresion)
args = append(args, ec.table)
query = fmt.Sprintf("UPDATE %s SET (%s)",
ec.table, ec.mainOperation.expresion)
args = append(args, ec.mainOperation.arguments...)
// SELECT, DELETE
case sqlSelect, sqlDelete:
Expand Down

0 comments on commit bd7e1fa

Please sign in to comment.