prom
prom copied to clipboard
Let's do some locking
We should be able to pass in serializable=True
to the transaction method to cause the begin to do:
BEGIN ISOLATION LEVEL SERIALIZABLE;
Also, it would be cool to add a .lock()
method to query that would cause it to add the FOR UPDATE
at the end:
SELECT balance FROM accounts WHERE user_id = 1 FOR UPDATE;