2020-02-07 18:45:35 +03:00
|
|
|
package clause
|
|
|
|
|
|
|
|
type Delete struct {
|
|
|
|
Modifier string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (d Delete) Name() string {
|
|
|
|
return "DELETE"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (d Delete) Build(builder Builder) {
|
2020-03-09 12:07:00 +03:00
|
|
|
builder.WriteString("DELETE")
|
2020-02-07 18:45:35 +03:00
|
|
|
|
|
|
|
if d.Modifier != "" {
|
|
|
|
builder.WriteByte(' ')
|
2020-03-09 12:07:00 +03:00
|
|
|
builder.WriteString(d.Modifier)
|
2020-02-07 18:45:35 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (d Delete) MergeClause(clause *Clause) {
|
|
|
|
clause.Name = ""
|
|
|
|
clause.Expression = d
|
|
|
|
}
|