(c *gc.C)
| 191 | } |
| 192 | |
| 193 | func (s *TableSuite) TestNestedRightJoin(c *gc.C) { |
| 194 | join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3)) |
| 195 | join2 := join1.RightJoinOn(table3, Eq(table1Col1, table3Col1)) |
| 196 | |
| 197 | buf := &bytes.Buffer{} |
| 198 | |
| 199 | err := join2.SerializeSql("db", buf) |
| 200 | c.Assert(err, gc.IsNil) |
| 201 | |
| 202 | sql := buf.String() |
| 203 | c.Assert( |
| 204 | sql, |
| 205 | gc.Equals, |
| 206 | "`db`.`table1` "+ |
| 207 | "JOIN `db`.`table2` ON `table1`.`col3`=`table2`.`col3` "+ |
| 208 | "RIGHT JOIN `db`.`table3` ON `table1`.`col1`=`table3`.`col1`") |
| 209 | } |
nothing calls this directly
no test coverage detected