Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/goctl/model/sql/gen/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func genDelete(table Table, withCache, postgreSql bool) (string, string, error)
deleteMethodOut, err := util.With("deleteMethod").
Parse(text).
Execute(map[string]any{
"withCache": withCache,
"lowerStartCamelPrimaryKey": util.EscapeGolangKeyword(stringx.From(table.PrimaryKey.Name.ToCamel()).Untitle()),
"dataType": table.PrimaryKey.DataType,
"data": table,
Expand Down
1 change: 1 addition & 0 deletions tools/goctl/model/sql/gen/findone.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func genFindOne(table Table, withCache, postgreSql bool) (string, string, error)
findOneMethod, err := util.With("findOneMethod").
Parse(text).
Execute(map[string]any{
"withCache": withCache,
"upperStartCamelObject": camel,
"lowerStartCamelPrimaryKey": util.EscapeGolangKeyword(stringx.From(table.PrimaryKey.Name.ToCamel()).Untitle()),
"dataType": table.PrimaryKey.DataType,
Expand Down
2 changes: 2 additions & 0 deletions tools/goctl/model/sql/gen/findonebyfield.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func genFindOneByField(table Table, withCache, postgreSql bool) (*findOneCode, e
in = inJoin.With(", ").Source()
}
output, err := t.Execute(map[string]any{
"withCache": withCache,
"upperStartCamelObject": camelTableName,
"upperField": key.FieldNameJoin.Camel().With("").Source(),
"in": in,
Expand All @@ -89,6 +90,7 @@ func genFindOneByField(table Table, withCache, postgreSql bool) (*findOneCode, e
}

out, err := util.With("findOneByFieldExtraMethod").Parse(text).Execute(map[string]any{
"withCache": withCache,
"upperStartCamelObject": camelTableName,
"primaryKeyLeft": table.PrimaryCacheKey.VarLeft,
"lowerStartCamelObject": stringx.From(camelTableName).Untitle(),
Expand Down
1 change: 1 addition & 0 deletions tools/goctl/model/sql/gen/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func genInsert(table Table, withCache, postgreSql bool) (string, string, error)
}

insertMethodOutput, err := util.With("insertMethod").Parse(text).Execute(map[string]any{
"withCache": withCache,
"upperStartCamelObject": camel,
"data": table,
})
Expand Down
1 change: 1 addition & 0 deletions tools/goctl/model/sql/gen/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func genUpdate(table Table, withCache, postgreSql bool) (

updateMethodOutput, err := util.With("updateMethod").Parse(text).Execute(
map[string]any{
"withCache": withCache,
"upperStartCamelObject": camelTableName,
"data": table,
},
Expand Down