(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestAddSetClause_Basic(t *testing.T) { |
| 22 | stmt := mustParse(t, "UPDATE users SET name = 'old'") |
| 23 | |
| 24 | err := Apply(stmt, AddSetClause("status", "'active'")) |
| 25 | if err != nil { |
| 26 | t.Fatalf("AddSetClause: %v", err) |
| 27 | } |
| 28 | |
| 29 | out := format(stmt) |
| 30 | assertContains(t, out, "status") |
| 31 | assertContains(t, out, "active") |
| 32 | } |
| 33 | |
| 34 | func TestAddSetClause_ReplacesExisting(t *testing.T) { |
| 35 | stmt := mustParse(t, "UPDATE users SET name = 'old', status = 'inactive'") |
nothing calls this directly
no test coverage detected