(c *gc.C)
| 155 | } |
| 156 | |
| 157 | func (s *TableSuite) TestNestedInnerJoin(c *gc.C) { |
| 158 | join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3)) |
| 159 | join2 := join1.InnerJoinOn(table3, Eq(table1Col1, table3Col1)) |
| 160 | |
| 161 | buf := &bytes.Buffer{} |
| 162 | |
| 163 | err := join2.SerializeSql("db", buf) |
| 164 | c.Assert(err, gc.IsNil) |
| 165 | |
| 166 | sql := buf.String() |
| 167 | c.Assert( |
| 168 | sql, |
| 169 | gc.Equals, |
| 170 | "`db`.`table1` "+ |
| 171 | "JOIN `db`.`table2` ON `table1`.`col3`=`table2`.`col3` "+ |
| 172 | "JOIN `db`.`table3` ON `table1`.`col1`=`table3`.`col1`") |
| 173 | } |
| 174 | |
| 175 | func (s *TableSuite) TestNestedLeftJoin(c *gc.C) { |
| 176 | join1 := table1.InnerJoinOn(table2, Eq(table1Col3, table2Col3)) |
nothing calls this directly
no test coverage detected