Jet internal refactor.

This commit is contained in:
go-jet 2019-08-11 14:29:03 +02:00
parent 4fbf576370
commit ee4897a1e2
49 changed files with 481 additions and 2528 deletions

21
postgres/clauses.go Normal file
View file

@ -0,0 +1,21 @@
package postgres
import (
"github.com/go-jet/jet/internal/jet"
)
type ClauseReturning struct {
Projections []jet.Projection
}
func (r *ClauseReturning) Serialize(statementType jet.StatementType, out *jet.SqlBuilder) error {
if len(r.Projections) == 0 {
return nil
}
out.NewLine()
out.WriteString("RETURNING")
out.IncreaseIdent()
return out.WriteProjections(statementType, r.Projections)
}