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

Function TestRemoveColumn_Nonexistent

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

Source from the content-addressed store, hash-verified

65}
66
67func TestRemoveColumn_Nonexistent(t *testing.T) {
68 stmt := mustParse(t, "SELECT id, name FROM users")
69 err := Apply(stmt, RemoveColumn("nonexistent"))
70 if err == nil {
71 t.Fatal("expected error for nonexistent column")
72 }
73 if err.Error() != `column "nonexistent" not found` {
74 t.Fatalf("unexpected error: %v", err)
75 }
76}
77
78func TestRemoveColumn_SingleColumn(t *testing.T) {
79 stmt := mustParse(t, "SELECT id, name FROM users")

Callers

nothing calls this directly

Calls 5

mustParseFunction · 0.85
ApplyFunction · 0.85
RemoveColumnFunction · 0.85
FatalfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected