Generate enum types for sqlbuilder.

This commit is contained in:
zer0sub 2019-06-03 17:05:29 +02:00
parent 7c98fb508c
commit ca5a30983e
6 changed files with 64 additions and 17 deletions

View file

@ -22,6 +22,7 @@ type expression interface {
ASC() orderByClause
DESC() orderByClause
CAST_TO(dbType string) expression
CAST_TO_BOOL() BoolExpression
CAST_TO_INTEGER() IntegerExpression
CAST_TO_DOUBLE() FloatExpression
@ -65,6 +66,10 @@ func (e *expressionInterfaceImpl) DESC() orderByClause {
return &orderByClauseImpl{expression: e.parent, ascent: false}
}
func (e *expressionInterfaceImpl) CAST_TO(dbType string) expression {
return newCast(e.parent, dbType)
}
func (e *expressionInterfaceImpl) CAST_TO_BOOL() BoolExpression {
return newBoolCast(e.parent)
}