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

Function TestRemoveColumn_SingleColumn

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

Source from the content-addressed store, hash-verified

76}
77
78func TestRemoveColumn_SingleColumn(t *testing.T) {
79 stmt := mustParse(t, "SELECT id, name FROM users")
80 err := Apply(stmt, RemoveColumn("id"))
81 if err != nil {
82 t.Fatal(err)
83 }
84 out := format(stmt)
85 assertNotContains(t, out, "id")
86 assertContains(t, out, "name")
87}
88
89func TestColumns_UnsupportedStatement(t *testing.T) {
90 stmt := mustParse(t, "UPDATE users SET name = 'bob'")

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