Order by sql serialization simplified.

This commit is contained in:
zer0sub 2019-05-08 12:49:36 +02:00
parent f016a93d78
commit d9bbec3795
7 changed files with 32 additions and 39 deletions

View file

@ -9,6 +9,7 @@ type expression interface {
clause
projection
groupByClause
orderByClause
IN(subQuery selectStatement) boolExpression
NOT_IN(subQuery selectStatement) boolExpression
@ -60,6 +61,10 @@ func (e *expressionInterfaceImpl) serializeForProjection(out *queryData) error {
return e.parent.serialize(out)
}
func (e *expressionInterfaceImpl) serializeAsOrderBy(out *queryData) error {
return e.parent.serialize(out)
}
// Representation of binary operations (e.g. comparisons, arithmetic)
type binaryExpression struct {
lhs, rhs expression