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

@ -73,3 +73,9 @@ func TestIntExpressionBIT_SHIFT_RIGHT(t *testing.T) {
assertClauseSerialize(t, table1ColInt.BIT_SHIFT_RIGHT(table2ColInt), "(table1.colInt >> table2.colInt)")
assertClauseSerialize(t, table1ColInt.BIT_SHIFT_RIGHT(Int(11)), "(table1.colInt >> $1)", int64(11))
}
func TestIntExpressionIntExp(t *testing.T) {
assertClauseSerialize(t, IntExp(table1ColFloat), "table1.colFloat")
assertClauseSerialize(t, IntExp(table1ColFloat.ADD(table2ColFloat)).ADD(Int(11)),
"((table1.colFloat + table2.colFloat) + $1)", int64(11))
}