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

Function TestAddColumn

pkg/transform/columns_test.go:23–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestAddColumn(t *testing.T) {
24 stmt := mustParse(t, "SELECT id FROM users")
25 err := Apply(stmt, AddColumn(&ast.Identifier{Name: "email"}))
26 if err != nil {
27 t.Fatal(err)
28 }
29 out := format(stmt)
30 assertContains(t, out, "email")
31 assertContains(t, out, "id")
32}
33
34func TestRemoveColumn(t *testing.T) {
35 stmt := mustParse(t, "SELECT id, name, email FROM users")

Callers

nothing calls this directly

Calls 5

mustParseFunction · 0.85
ApplyFunction · 0.85
AddColumnFunction · 0.85
assertContainsFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected