Time, Timez, Timestamp, Timestampz, Date column types added.
This commit is contained in:
parent
7b89caa7e0
commit
7f5ba98819
20 changed files with 620 additions and 60 deletions
|
|
@ -5,6 +5,9 @@ type timeExpression interface {
|
|||
|
||||
EQ(rhs timeExpression) boolExpression
|
||||
NOT_EQ(rhs timeExpression) boolExpression
|
||||
IS_DISTINCT_FROM(rhs timeExpression) boolExpression
|
||||
IS_NOT_DISTINCT_FROM(rhs timeExpression) boolExpression
|
||||
|
||||
LT(rhs timeExpression) boolExpression
|
||||
LT_EQ(rhs timeExpression) boolExpression
|
||||
GT(rhs timeExpression) boolExpression
|
||||
|
|
@ -23,6 +26,14 @@ func (t *timeInterfaceImpl) NOT_EQ(rhs timeExpression) boolExpression {
|
|||
return NOT_EQ(t.parent, rhs)
|
||||
}
|
||||
|
||||
func (t *timeInterfaceImpl) IS_DISTINCT_FROM(rhs timeExpression) boolExpression {
|
||||
return IS_DISTINCT_FROM(t.parent, rhs)
|
||||
}
|
||||
|
||||
func (t *timeInterfaceImpl) IS_NOT_DISTINCT_FROM(rhs timeExpression) boolExpression {
|
||||
return IS_NOT_DISTINCT_FROM(t.parent, rhs)
|
||||
}
|
||||
|
||||
func (t *timeInterfaceImpl) LT(rhs timeExpression) boolExpression {
|
||||
return LT(t.parent, rhs)
|
||||
}
|
||||
|
|
@ -47,7 +58,7 @@ type prefixTimeExpression struct {
|
|||
prefixOpExpression
|
||||
}
|
||||
|
||||
func newPrefixTimeExpression(expression expression, operator string) timeExpression {
|
||||
func newPrefixTimeExpression(operator string, expression expression) timeExpression {
|
||||
timeExpr := prefixTimeExpression{}
|
||||
timeExpr.prefixOpExpression = newPrefixExpression(expression, operator)
|
||||
|
||||
|
|
@ -58,5 +69,5 @@ func newPrefixTimeExpression(expression expression, operator string) timeExpress
|
|||
}
|
||||
|
||||
func INTERVAL(interval string) expression {
|
||||
return newPrefixTimeExpression(Literal(interval), "INTERVAL")
|
||||
return newPrefixTimeExpression("INTERVAL", Literal(interval))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue