Improvements on sub-query projection reference.

This commit is contained in:
go-jet 2019-06-18 14:35:32 +02:00
parent d9ffa86453
commit 565b670188
17 changed files with 512 additions and 134 deletions

View file

@ -2,4 +2,29 @@ package sqlbuilder
type projection interface {
serializeForProjection(statement statementType, out *queryData) error
from(subQuery ExpressionTable) projection
}
//------------------------------------------------------//
// Dummy type for projection list
type ProjectionList []projection
func (cl ProjectionList) from(subQuery ExpressionTable) projection {
newProjectionList := ProjectionList{}
for _, projection := range cl {
newProjectionList = append(newProjectionList, projection.from(subQuery))
}
return newProjectionList
}
func (cl ProjectionList) serializeForProjection(statement statementType, out *queryData) error {
err := serializeProjectionList(statement, cl, out)
if err != nil {
return err
}
return nil
}