Feature add template version (#1152)

This commit is contained in:
anqiansong
2021-10-29 09:55:41 +08:00
committed by GitHub
parent bd26783b33
commit 9c48e9ceab
2 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,8 @@ import (
func genInsert(table Table, withCache, postgreSql bool) (string, string, error) {
keySet := collection.NewSet()
keyVariableSet := collection.NewSet()
keySet.AddStr(table.PrimaryCacheKey.DataKeyExpression)
keyVariableSet.AddStr(table.PrimaryCacheKey.KeyLeft)
for _, key := range table.UniqueCacheKey {
keySet.AddStr(key.DataKeyExpression)
keyVariableSet.AddStr(key.KeyLeft)