Explicit sqlbuilder cast.

This commit is contained in:
zer0sub 2019-06-07 14:23:14 +02:00
parent 4d7fbf8f49
commit 3c5553b3dc
21 changed files with 293 additions and 104 deletions

View file

@ -33,3 +33,9 @@ func TestTimeExpressionGT_EQ(t *testing.T) {
assertClauseSerialize(t, table1ColTime.GT_EQ(table2ColTime), "(table1.colTime >= table2.colTime)")
assertClauseSerialize(t, table1ColTime.GT_EQ(Time(10, 20, 0, 0)), "(table1.colTime >= $1::time without time zone)", "10:20:00.000")
}
func TestTimeExp(t *testing.T) {
assertClauseSerialize(t, TimeExp(table1ColFloat), "table1.colFloat")
assertClauseSerialize(t, TimeExp(table1ColFloat).LT(Time(1, 1, 1, 1)),
"(table1.colFloat < $1::time without time zone)", string("01:01:01.001"))
}