(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestRemoveReturning_RemovesClause(t *testing.T) { |
| 92 | stmt := mustParse(t, "DELETE FROM users WHERE id = 1") |
| 93 | |
| 94 | _ = Apply(stmt, AddReturning("id")) |
| 95 | err := Apply(stmt, RemoveReturning()) |
| 96 | if err != nil { |
| 97 | t.Fatalf("RemoveReturning: %v", err) |
| 98 | } |
| 99 | |
| 100 | out := format(stmt) |
| 101 | assertNotContains(t, out, "RETURNING") |
| 102 | } |
| 103 | |
| 104 | func TestRemoveReturning_OnUpdate(t *testing.T) { |
| 105 | stmt := mustParse(t, "UPDATE users SET status = 'active'") |
nothing calls this directly
no test coverage detected