[MySQL] Add NEW alias for the rows to be inserted.

This commit is contained in:
go-jet 2022-08-23 12:23:46 +02:00
parent c264529e95
commit 4e1ff65023
6 changed files with 135 additions and 107 deletions

View file

@ -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)
}