finclip-app-manager/vendor/gorm.io/gorm/clause/delete.go

24 lines
359 B
Go
Raw Permalink Normal View History

2023-11-02 18:36:36 +08:00
package clause
type Delete struct {
Modifier string
}
func (d Delete) Name() string {
return "DELETE"
}
func (d Delete) Build(builder Builder) {
builder.WriteString("DELETE")
if d.Modifier != "" {
builder.WriteByte(' ')
builder.WriteString(d.Modifier)
}
}
func (d Delete) MergeClause(clause *Clause) {
clause.Name = ""
clause.Expression = d
}