goctl added

This commit is contained in:
kim
2020-07-29 17:11:41 +08:00
parent b1975d29a7
commit 121323b8c3
142 changed files with 10690 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package sqltemplate
var Vars = `
var (
{{.lowerObject}}FieldNames = builderx.FieldNames(&{{.upperObject}}{})
{{.lowerObject}}Rows = strings.Join({{.lowerObject}}FieldNames, ",")
{{.lowerObject}}RowsExpectAutoSet = strings.Join(stringx.Remove({{.lowerObject}}FieldNames, "{{.snakePrimaryKey}}", "create_time", "update_time"), ",")
{{.lowerObject}}RowsWithPlaceHolder = strings.Join(stringx.Remove({{.lowerObject}}FieldNames, "{{.snakePrimaryKey}}", "create_time", "update_time"), "=?,") + "=?"
{{.keysDefine}}
{{if .createNotFound}}ErrNotFound = sqlx.ErrNotFound{{end}}
)
`