6 ms·
BEGIN TRANSACTION; ... ; Modify DB ... ; Inspect State ROLLBACK TRANSACTION; and then switch the rollback to commit when satisfied
by Avery3R 3y ago
BEGIN TRANSACTION;
... ; Modify DB
... ; Inspect State
ROLLBACK TRANSACTION;
and then switch the rollback to commit when satisfied
- jagtstronaut 3y agoThis is cool I probably will do this.
- wnolens 3y agoJust mind the isolation level of concurrent queries which may be running. By default you are probably fine since it's usually snapshot isolation mode (will only see committed results as of query start) but there are other modes that break this.