jet/sqlbuilder/projection.go

24 lines
540 B
Go
Raw Normal View History

package sqlbuilder
2019-05-07 19:06:21 +02:00
type projection interface {
serializeForProjection(statement statementType, out *queryData) error
}
//------------------------------------------------------//
// Dummy type for select * AllColumns
2019-06-05 17:15:20 +02:00
type ColumnList []Column
2019-05-07 19:06:21 +02:00
func (cl ColumnList) isProjectionType() {}
func (cl ColumnList) serializeForProjection(statement statementType, out *queryData) error {
2019-06-09 11:06:08 +02:00
projections := columnListToProjectionList(cl)
2019-06-09 11:06:08 +02:00
err := serializeProjectionList(statement, projections, out)
2019-06-09 11:06:08 +02:00
if err != nil {
return err
}
2019-05-03 12:51:57 +02:00
2019-06-09 11:06:08 +02:00
return nil
2019-05-03 12:51:57 +02:00
}