(c *gc.C)
| 406 | } |
| 407 | |
| 408 | func (s *StmtSuite) TestUpdateSingleValue(c *gc.C) { |
| 409 | stmt := table1.Update().Set(table1Col1, Literal(1)) |
| 410 | stmt.Where(EqL(table1Col2, 2)) |
| 411 | sql, err := stmt.String("db") |
| 412 | c.Assert(err, gc.IsNil) |
| 413 | |
| 414 | c.Assert( |
| 415 | sql, |
| 416 | gc.Equals, |
| 417 | "UPDATE `db`.`table1` SET `table1`.`col1`=1 WHERE `table1`.`col2`=2") |
| 418 | } |
| 419 | |
| 420 | func (s *StmtSuite) TestUpdateUsingDeferredLookupColumns(c *gc.C) { |
| 421 | stmt := table1.Update().Set(table1.C("col1"), Literal(1)) |