From bd7e1faccd4725e89d8bd879161b678789dcd3de Mon Sep 17 00:00:00 2001 From: Horacio Duran Date: Tue, 26 Jun 2018 11:11:11 -0300 Subject: [PATCH] Correct the way update is rendered --- db/chain/chain.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/chain/chain.go b/db/chain/chain.go index 872d85d..fffffe1 100644 --- a/db/chain/chain.go +++ b/db/chain/chain.go @@ -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: