MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestCTEWithMaterialized

Function TestCTEWithMaterialized

pkg/sql/ast/sql_coverage_test.go:487–498  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

485}
486
487func 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
500func TestOnConflictSQL(t *testing.T) {
501 // DO NOTHING

Callers

nothing calls this directly

Calls 3

SQLMethod · 0.95
covBoolPtrFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected