(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestSetClause_ReplaceExisting(t *testing.T) { |
| 50 | stmt := mustParse(t, "UPDATE users SET name = 'old', status = 'active'") |
| 51 | |
| 52 | err := Apply(stmt, SetClause("name", "'new'")) |
| 53 | if err != nil { |
| 54 | t.Fatalf("SetClause: %v", err) |
| 55 | } |
| 56 | |
| 57 | out := format(stmt) |
| 58 | assertContains(t, out, "new") |
| 59 | assertNotContains(t, out, "old") |
| 60 | } |
| 61 | |
| 62 | func TestRemoveSetClause_RemovesColumn(t *testing.T) { |
| 63 | stmt := mustParse(t, "UPDATE users SET name = 'alice', status = 'active', age = 30") |
nothing calls this directly
no test coverage detected