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