Improvements on sub-query projection reference.
This commit is contained in:
parent
d9ffa86453
commit
565b670188
17 changed files with 512 additions and 134 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue