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

Function TestAddSetClause_CaseInsensitiveColumn

pkg/transform/set_test.go:147–158  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestAddSetClause_CaseInsensitiveColumn(t *testing.T) {
148 stmt := mustParse(t, "UPDATE users SET Name = 'old'")
149
150 err := Apply(stmt, AddSetClause("name", "'new'"))
151 if err != nil {
152 t.Fatalf("AddSetClause: %v", err)
153 }
154
155 out := format(stmt)
156 assertContains(t, out, "new")
157 assertNotContains(t, out, "old")
158}
159
160func TestAddSetClause_WithNumericValue(t *testing.T) {
161 stmt := mustParse(t, "UPDATE counters SET total = 0")

Callers

nothing calls this directly

Calls 7

mustParseFunction · 0.85
ApplyFunction · 0.85
AddSetClauseFunction · 0.85
assertContainsFunction · 0.85
assertNotContainsFunction · 0.85
formatFunction · 0.70
FatalfMethod · 0.65

Tested by

no test coverage detected