Support for raw sql input.
This commit is contained in:
parent
384c0c67f5
commit
8f51662fe5
31 changed files with 307 additions and 279 deletions
|
|
@ -2,12 +2,12 @@ package sqlbuilder
|
|||
|
||||
import "github.com/dropbox/godropbox/errors"
|
||||
|
||||
type orderByClause interface {
|
||||
type OrderByClause interface {
|
||||
serializeAsOrderBy(statement statementType, out *queryData) error
|
||||
}
|
||||
|
||||
type orderByClauseImpl struct {
|
||||
expression expression
|
||||
expression Expression
|
||||
ascent bool
|
||||
}
|
||||
|
||||
|
|
@ -29,10 +29,10 @@ func (o *orderByClauseImpl) serializeAsOrderBy(statement statementType, out *que
|
|||
return nil
|
||||
}
|
||||
|
||||
func ASC(expression expression) orderByClause {
|
||||
func ASC(expression Expression) OrderByClause {
|
||||
return &orderByClauseImpl{expression: expression, ascent: true}
|
||||
}
|
||||
|
||||
func DESC(expression expression) orderByClause {
|
||||
func DESC(expression Expression) OrderByClause {
|
||||
return &orderByClauseImpl{expression: expression, ascent: false}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue