(t *testing.T)
| 262 | } |
| 263 | |
| 264 | func TestDelete_SQL(t *testing.T) { |
| 265 | d := &Delete{ |
| 266 | Table: TableReference{Name: "t"}, |
| 267 | Where: &Identifier{Name: "true"}, |
| 268 | ReturningClause: []Expression{&Identifier{Name: "id"}}, |
| 269 | } |
| 270 | sql := d.SQL() |
| 271 | if !strings.Contains(sql, "RETURNING id") { |
| 272 | t.Errorf("got: %s", sql) |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | func TestExtractExpression_SQL(t *testing.T) { |
| 277 | e := &ExtractExpression{Field: "YEAR", Source: &Identifier{Name: "created_at"}} |