(t *testing.T)
| 2060 | } |
| 2061 | |
| 2062 | func TestBoolPredicates(t *testing.T) { |
| 2063 | t1, t2 := Table("users"), Table("posts") |
| 2064 | query, args := Select(). |
| 2065 | From(t1). |
| 2066 | Join(t2). |
| 2067 | On(t1.C("id"), t2.C("author_id")). |
| 2068 | Where( |
| 2069 | And( |
| 2070 | EQ(t1.C("active"), true), |
| 2071 | NEQ(t2.C("deleted"), true), |
| 2072 | ), |
| 2073 | ). |
| 2074 | Query() |
| 2075 | require.Nil(t, args) |
| 2076 | require.Equal(t, "SELECT * FROM `users` JOIN `posts` AS `t1` ON `users`.`id` = `t1`.`author_id` WHERE `users`.`active` AND NOT `t1`.`deleted`", query) |
| 2077 | } |
| 2078 | |
| 2079 | func TestWindowFunction(t *testing.T) { |
| 2080 | posts := Table("posts") |
nothing calls this directly
no test coverage detected
searching dependent graphs…