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

Function TestSetOperation_SQL

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

Source from the content-addressed store, hash-verified

106}
107
108func TestSetOperation_SQL(t *testing.T) {
109 s := &SetOperation{
110 Left: &SelectStatement{Columns: []Expression{&Identifier{Name: "a"}}, From: []TableReference{{Name: "t1"}}},
111 Right: &SelectStatement{Columns: []Expression{&Identifier{Name: "b"}}, From: []TableReference{{Name: "t2"}}},
112 Operator: "UNION",
113 All: true,
114 }
115 sql := s.SQL()
116 if !strings.Contains(sql, "UNION ALL") {
117 t.Errorf("missing UNION ALL in: %s", sql)
118 }
119}
120
121func TestValues_SQL(t *testing.T) {
122 v := &Values{

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected