(c *gc.C)
| 173 | } |
| 174 | |
| 175 | func (s *TableSuite) TestNestedLeftJoin(c *gc.C) { |
| 176 | join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3)) |
| 177 | join2 := join1.LeftJoinOn(table3, Eq(table1Col1, table3Col1)) |
| 178 | |
| 179 | buf := &bytes.Buffer{} |
| 180 | |
| 181 | err := join2.SerializeSql("db", buf) |
| 182 | c.Assert(err, gc.IsNil) |
| 183 | |
| 184 | sql := buf.String() |
| 185 | c.Assert( |
| 186 | sql, |
| 187 | gc.Equals, |
| 188 | "`db`.`table1` "+ |
| 189 | "JOIN `db`.`table2` ON `table1`.`col3`=`table2`.`col3` "+ |
| 190 | "LEFT JOIN `db`.`table3` ON `table1`.`col1`=`table3`.`col1`") |
| 191 | } |
| 192 | |
| 193 | func (s *TableSuite) TestNestedRightJoin(c *gc.C) { |
| 194 | join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3)) |
nothing calls this directly
no test coverage detected