Add postgres interval cast.
This commit is contained in:
parent
4a3579e7f9
commit
a2fbc4f53a
4 changed files with 56 additions and 20 deletions
|
|
@ -62,3 +62,10 @@ func TestExpressionCAST_AS_TIMESTAMP(t *testing.T) {
|
|||
func TestExpressionCAST_AS_TIMESTAMPZ(t *testing.T) {
|
||||
assertSerialize(t, CAST(table2Col3).AS_TIMESTAMPZ(), "table2.col3::timestamp with time zone")
|
||||
}
|
||||
|
||||
func TestExpressionCAST_AS_INTERVAL(t *testing.T) {
|
||||
assertSerialize(t, CAST(table2ColTimez).AS_INTERVAL(), "table2.col_timez::interval")
|
||||
assertSerialize(t, CAST(Time(20, 11, 10)).AS_INTERVAL(), "$1::time without time zone::interval", "20:11:10")
|
||||
assertSerialize(t, table2ColDate.SUB(CAST(Time(20, 11, 10)).AS_INTERVAL()),
|
||||
"(table2.col_date - $1::time without time zone::interval)", "20:11:10")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue