mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-25 02:08:44 +08:00
10 lines
325 B
Go
10 lines
325 B
Go
package sqltemplate
|
|
|
|
var Insert = `
|
|
func (m *{{.upperObject}}Model) Insert(data {{.upperObject}}) error {
|
|
query := ` + "`" + `insert into ` + "`" + ` + m.table + ` + "`(` + " + `{{.lowerObject}}RowsExpectAutoSet` + " + `) value ({{.expression}})` " + `
|
|
_, err := m.ExecNoCache(query, {{.expressionValues}})
|
|
return err
|
|
}
|
|
`
|