Jet internal refactor.
This commit is contained in:
parent
4fbf576370
commit
ee4897a1e2
49 changed files with 481 additions and 2528 deletions
21
postgres/clauses.go
Normal file
21
postgres/clauses.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue