mirror of
https://git.swurl.xyz/swirl/link.git
synced 2025-01-30 06:46:41 +00:00
24 lines
359 B
Go
24 lines
359 B
Go
|
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
|
||
|
}
|