(t *testing.T)
| 485 | } |
| 486 | |
| 487 | func TestCTEWithMaterialized(t *testing.T) { |
| 488 | w := &WithClause{ |
| 489 | CTEs: []*CommonTableExpr{ |
| 490 | {Name: "cte1", Materialized: covBoolPtr(true), Statement: &SelectStatement{Columns: []Expression{&Identifier{Name: "a"}}}}, |
| 491 | {Name: "cte2", Materialized: covBoolPtr(false), Statement: &SelectStatement{Columns: []Expression{&Identifier{Name: "b"}}}}, |
| 492 | }, |
| 493 | } |
| 494 | sql := w.SQL() |
| 495 | if !strings.Contains(sql, "MATERIALIZED") || !strings.Contains(sql, "NOT MATERIALIZED") { |
| 496 | t.Errorf("got: %s", sql) |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | func TestOnConflictSQL(t *testing.T) { |
| 501 | // DO NOTHING |
nothing calls this directly
no test coverage detected