Simplified creation of operator expression.

This commit is contained in:
go-jet 2019-12-07 18:52:46 +01:00
parent a2fbc4f53a
commit 57aa62f483
6 changed files with 75 additions and 102 deletions

View file

@ -27,6 +27,20 @@ func TestExists(t *testing.T) {
FROM db.table2
WHERE table1.col1 = table2.col3
))`, int64(1))
assertSerialize(t, EXISTS(
SELECT(Int(1)),
).EQ(Bool(true)),
`((EXISTS (
SELECT $1
)) = $2)`, int64(1), true)
assertProjectionSerialize(t, EXISTS(
SELECT(Int(1)),
).AS("exists"),
`(EXISTS (
SELECT $1
)) AS "exists"`, int64(1))
}
func TestIN(t *testing.T) {