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

Function TestRemoveColumn

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

Source from the content-addressed store, hash-verified

32}
33
34func TestRemoveColumn(t *testing.T) {
35 stmt := mustParse(t, "SELECT id, name, email FROM users")
36 err := Apply(stmt, RemoveColumn("name"))
37 if err != nil {
38 t.Fatal(err)
39 }
40 out := format(stmt)
41 assertNotContains(t, out, "name")
42 assertContains(t, out, "id")
43 assertContains(t, out, "email")
44}
45
46func TestReplaceColumn(t *testing.T) {
47 stmt := mustParse(t, "SELECT id, name FROM users")

Callers

nothing calls this directly

Calls 6

mustParseFunction · 0.85
ApplyFunction · 0.85
RemoveColumnFunction · 0.85
assertNotContainsFunction · 0.85
assertContainsFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected