jet/projection.go

29 lines
642 B
Go
Raw Normal View History

2019-06-21 13:56:57 +02:00
package jet
2019-05-07 19:06:21 +02:00
type projection interface {
2019-07-08 10:48:03 +02:00
serializeForProjection(statement statementType, out *sqlBuilder) error
from(subQuery ExpressionTable) projection
}
type ProjectionList []projection
func (cl ProjectionList) from(subQuery ExpressionTable) projection {
newProjectionList := ProjectionList{}
for _, projection := range cl {
newProjectionList = append(newProjectionList, projection.from(subQuery))
}
return newProjectionList
}
2019-07-08 10:48:03 +02:00
func (cl ProjectionList) serializeForProjection(statement statementType, out *sqlBuilder) error {
err := serializeProjectionList(statement, cl, out)
if err != nil {
return err
}
return nil
}