mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-25 02:08:44 +08:00
15 lines
622 B
Go
15 lines
622 B
Go
|
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}}
|
||
|
)
|
||
|
`
|