2020-08-19 10:41:19 +08:00
|
|
|
package template
|
2020-07-29 17:11:41 +08:00
|
|
|
|
|
|
|
var Vars = `
|
|
|
|
var (
|
2020-08-19 10:41:19 +08:00
|
|
|
{{.lowerStartCamelObject}}FieldNames = builderx.FieldNames(&{{.upperStartCamelObject}}{})
|
|
|
|
{{.lowerStartCamelObject}}Rows = strings.Join({{.lowerStartCamelObject}}FieldNames, ",")
|
|
|
|
{{.lowerStartCamelObject}}RowsExpectAutoSet = strings.Join(stringx.Remove({{.lowerStartCamelObject}}FieldNames, {{if .autoIncrement}}"{{.originalPrimaryKey}}",{{end}} "create_time", "update_time"), ",")
|
|
|
|
{{.lowerStartCamelObject}}RowsWithPlaceHolder = strings.Join(stringx.Remove({{.lowerStartCamelObject}}FieldNames, "{{.originalPrimaryKey}}", "create_time", "update_time"), "=?,") + "=?"
|
2020-07-29 17:11:41 +08:00
|
|
|
|
2020-08-19 10:41:19 +08:00
|
|
|
{{if .withCache}}{{.cacheKeys}}{{end}}
|
2020-07-29 17:11:41 +08:00
|
|
|
)
|
|
|
|
`
|