Fix/issue#1447 (#1458)
* Add data for template to render * fix #1447 Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
@@ -62,6 +62,7 @@ func genInsert(table Table, withCache, postgreSql bool) (string, string, error)
|
||||
"expressionValues": strings.Join(expressionValues, ", "),
|
||||
"keys": strings.Join(keySet.KeysStr(), "\n"),
|
||||
"keyValues": strings.Join(keyVariableSet.KeysStr(), ", "),
|
||||
"data": table,
|
||||
})
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
@@ -75,6 +76,7 @@ func genInsert(table Table, withCache, postgreSql bool) (string, string, error)
|
||||
|
||||
insertMethodOutput, err := util.With("insertMethod").Parse(text).Execute(map[string]interface{}{
|
||||
"upperStartCamelObject": camel,
|
||||
"data": table,
|
||||
})
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
|
||||
Reference in New Issue
Block a user