[MySQL] Add NEW alias for the rows to be inserted.
This commit is contained in:
parent
c264529e95
commit
4e1ff65023
6 changed files with 135 additions and 107 deletions
|
|
@ -392,6 +392,7 @@ func (v *ClauseValuesQuery) Serialize(statementType StatementType, out *SQLBuild
|
|||
// ClauseValues struct
|
||||
type ClauseValues struct {
|
||||
Rows [][]Serializer
|
||||
As string
|
||||
}
|
||||
|
||||
// Serialize serializes clause into SQLBuilder
|
||||
|
|
@ -417,6 +418,12 @@ func (v *ClauseValues) Serialize(statementType StatementType, out *SQLBuilder, o
|
|||
|
||||
out.WriteByte(')')
|
||||
}
|
||||
|
||||
if len(v.As) > 0 {
|
||||
out.WriteString("AS")
|
||||
out.WriteIdentifier(v.As)
|
||||
}
|
||||
|
||||
out.DecreaseIdent(7)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue