Skip to content

Commit bd7e1fa

Browse files
committed
Correct the way update is rendered
1 parent 91057ad commit bd7e1fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

db/chain/chain.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,8 @@ func (ec *ExpresionChain) render(raw bool) (string, []interface{}, error) {
594594
if len(expresion) == 0 {
595595
return "", nil, errors.Errorf("empty update expresion")
596596
}
597-
query = fmt.Sprintf("UPDATE ? SET (%s)",
598-
ec.mainOperation.expresion)
599-
args = append(args, ec.table)
597+
query = fmt.Sprintf("UPDATE %s SET (%s)",
598+
ec.table, ec.mainOperation.expresion)
600599
args = append(args, ec.mainOperation.arguments...)
601600
// SELECT, DELETE
602601
case sqlSelect, sqlDelete:

0 commit comments

Comments
 (0)