top | item 36464263

(no title)

Avery3R | 2 years ago

BEGIN TRANSACTION;

... ; Modify DB

... ; Inspect State

ROLLBACK TRANSACTION;

and then switch the rollback to commit when satisfied

discuss

order

jagtstronaut|2 years ago

This is cool I probably will do this.

wnolens|2 years ago

Just 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.