(c *gc.C)
| 462 | } |
| 463 | |
| 464 | func (s *StmtSuite) TestUpdateWithLimit(c *gc.C) { |
| 465 | stmt := table1.Update().Set(table1Col1, Literal(1)) |
| 466 | stmt.Where(EqL(table1Col2, 2)) |
| 467 | stmt.Limit(5) |
| 468 | sql, err := stmt.String("db") |
| 469 | c.Assert(err, gc.IsNil) |
| 470 | |
| 471 | c.Assert( |
| 472 | sql, |
| 473 | gc.Equals, |
| 474 | "UPDATE `db`.`table1` "+ |
| 475 | "SET `table1`.`col1`=1 "+ |
| 476 | "WHERE `table1`.`col2`=2 "+ |
| 477 | "LIMIT 5") |
| 478 | } |
| 479 | |
| 480 | // |
| 481 | // DELETE statement tests ===================================================== |