Set or unset the "needs rollback" flag -- for *advanced use* only. When `rollback` is `True`, trigger a rollback when exiting the innermost enclosing atomic block that has `savepoint=True` (that's the default). Use this to force a rollback without raising an exception. When `r
(rollback, using=None)
| 94 | |
| 95 | |
| 96 | def set_rollback(rollback, using=None): |
| 97 | """ |
| 98 | Set or unset the "needs rollback" flag -- for *advanced use* only. |
| 99 | |
| 100 | When `rollback` is `True`, trigger a rollback when exiting the innermost |
| 101 | enclosing atomic block that has `savepoint=True` (that's the default). Use |
| 102 | this to force a rollback without raising an exception. |
| 103 | |
| 104 | When `rollback` is `False`, prevent such a rollback. Use this only after |
| 105 | rolling back to a known-good state! Otherwise, you break the atomic block |
| 106 | and data corruption may occur. |
| 107 | """ |
| 108 | return get_connection(using).set_rollback(rollback) |
| 109 | |
| 110 | |
| 111 | @contextmanager |
nothing calls this directly
no test coverage detected