SQL Builder panics on invalid SQL.
Query execution panics on invalid destination.
This commit is contained in:
parent
14c2c9d745
commit
486e45db5c
42 changed files with 357 additions and 713 deletions
|
|
@ -8,14 +8,13 @@ type ClauseReturning struct {
|
|||
Projections []jet.Projection
|
||||
}
|
||||
|
||||
func (r *ClauseReturning) Serialize(statementType jet.StatementType, out *jet.SqlBuilder) error {
|
||||
func (r *ClauseReturning) Serialize(statementType jet.StatementType, out *jet.SqlBuilder) {
|
||||
if len(r.Projections) == 0 {
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
out.NewLine()
|
||||
out.WriteString("RETURNING")
|
||||
out.IncreaseIdent()
|
||||
|
||||
return out.WriteProjections(statementType, r.Projections)
|
||||
out.WriteProjections(statementType, r.Projections)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue