Add FROM clause support for UPDATE statements
This commit is contained in:
parent
97c34fbb54
commit
72e8d7d584
11 changed files with 211 additions and 18 deletions
|
|
@ -45,6 +45,7 @@ func (s *ClauseSelect) Serialize(statementType StatementType, out *SQLBuilder, o
|
|||
|
||||
// ClauseFrom struct
|
||||
type ClauseFrom struct {
|
||||
Name string
|
||||
Tables []Serializer
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +55,11 @@ func (f *ClauseFrom) Serialize(statementType StatementType, out *SQLBuilder, opt
|
|||
return
|
||||
}
|
||||
out.NewLine()
|
||||
out.WriteString("FROM")
|
||||
if f.Name != "" {
|
||||
out.WriteString(f.Name)
|
||||
} else {
|
||||
out.WriteString("FROM")
|
||||
}
|
||||
|
||||
out.IncreaseIdent()
|
||||
for i, table := range f.Tables {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue