mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
d21d770b5b
* reactor sql generation
* reactor sql generation
* add console & example
* optimize unit test & add document
* modify default config
* remove test file
* Revert "remove test file"
This reverts commit 81041f9e
* fix stringx.go & optimize example
* remove unused code
13 lines
680 B
Go
13 lines
680 B
Go
package template
|
|
|
|
var Vars = `
|
|
var (
|
|
{{.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"), "=?,") + "=?"
|
|
|
|
{{if .withCache}}{{.cacheKeys}}{{end}}
|
|
)
|
|
`
|