Column types refactoring.

This commit is contained in:
zer0sub 2019-03-31 14:07:58 +02:00
parent 38007810c1
commit 033ab1d0da
19 changed files with 746 additions and 396 deletions

View file

@ -36,7 +36,7 @@ type selectStatementImpl struct {
expressionInterfaceImpl
table ReadableTable
projections []Projection
projections []Expression
where BoolExpression
group *listClause
having BoolExpression
@ -50,7 +50,7 @@ type selectStatementImpl struct {
func newSelectStatement(
table ReadableTable,
projections []Projection) SelectStatement {
projections []Expression) SelectStatement {
return &selectStatementImpl{
table: table,
@ -63,7 +63,7 @@ func newSelectStatement(
}
}
func (s *selectStatementImpl) SerializeSql(out *bytes.Buffer) error {
func (s *selectStatementImpl) SerializeSql(out *bytes.Buffer, options ...serializeOption) error {
str, err := s.String()
if err != nil {
@ -210,7 +210,7 @@ func (q *selectStatementImpl) String() (sql string, err error) {
"nil column selected. Generated sql: %s",
buf.String())
}
if err = col.SerializeSqlForColumnList(buf); err != nil {
if err = col.SerializeSql(buf, FOR_PROJECTION); err != nil {
return
}
}