Package path refactor.
This commit is contained in:
parent
829736279b
commit
83d4c5ad03
72 changed files with 162 additions and 188 deletions
30
projection.go
Normal file
30
projection.go
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package jet
|
||||
|
||||
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