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

Function TestRemoveWhere

pkg/transform/where_test.go:98–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestRemoveWhere(t *testing.T) {
99 stmt := mustParse(t, "SELECT * FROM users WHERE active = true")
100 err := Apply(stmt, RemoveWhere())
101 if err != nil {
102 t.Fatal(err)
103 }
104 out := format(stmt)
105 assertNotContains(t, out, "WHERE")
106}
107
108func TestReplaceWhere(t *testing.T) {
109 stmt := mustParse(t, "SELECT * FROM users WHERE active = true")

Callers

nothing calls this directly

Calls 5

mustParseFunction · 0.85
ApplyFunction · 0.85
RemoveWhereFunction · 0.85
assertNotContainsFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected