From 83d90f3f28e63fd172fe8cb0ced83b6cc2341731 Mon Sep 17 00:00:00 2001 From: Sergey Kurt Date: Tue, 14 Mar 2017 13:48:38 +0300 Subject: [PATCH] Fixed quote symbols order --- templates/15_insert.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/15_insert.tpl b/templates/15_insert.tpl index 5fea2c3..4833bef 100644 --- a/templates/15_insert.tpl +++ b/templates/15_insert.tpl @@ -66,7 +66,7 @@ func (o *{{$tableNameSingular}}) Insert(exec boil.Executor, whitelist ... string return err } if len(wl) != 0 { - cache.query = fmt.Sprintf("INSERT INTO {{$schemaTable}} ({{.LQ}}%s{{.RQ}}) VALUES (%s)", strings.Join(wl, "{{.LQ}},{{.RQ}}"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1)) + cache.query = fmt.Sprintf("INSERT INTO {{$schemaTable}} ({{.LQ}}%s{{.RQ}}) VALUES (%s)", strings.Join(wl, "{{.RQ}},{{.LQ}}"), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1)) } else { {{if eq .DriverName "mysql" -}} cache.query = "INSERT INTO {{$schemaTable}} () VALUES ()" @@ -77,9 +77,9 @@ func (o *{{$tableNameSingular}}) Insert(exec boil.Executor, whitelist ... string if len(cache.retMapping) != 0 { {{if .UseLastInsertID -}} - cache.retQuery = fmt.Sprintf("SELECT {{.LQ}}%s{{.RQ}} FROM {{$schemaTable}} WHERE %s", strings.Join(returnColumns, "{{.LQ}},{{.RQ}}"), strmangle.WhereClause("{{.LQ}}", "{{.RQ}}", {{if .Dialect.IndexPlaceholders}}1{{else}}0{{end}}, {{$varNameSingular}}PrimaryKeyColumns)) + cache.retQuery = fmt.Sprintf("SELECT {{.LQ}}%s{{.RQ}} FROM {{$schemaTable}} WHERE %s", strings.Join(returnColumns, "{{.RQ}},{{.LQ}}"), strmangle.WhereClause("{{.LQ}}", "{{.RQ}}", {{if .Dialect.IndexPlaceholders}}1{{else}}0{{end}}, {{$varNameSingular}}PrimaryKeyColumns)) {{else -}} - cache.query += fmt.Sprintf(" RETURNING {{.LQ}}%s{{.RQ}}", strings.Join(returnColumns, "{{.LQ}},{{.RQ}}")) + cache.query += fmt.Sprintf(" RETURNING {{.LQ}}%s{{.RQ}}", strings.Join(returnColumns, "{{.RQ}},{{.LQ}}")) {{end -}} } }