-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpg-example3.txt
34 lines (32 loc) · 899 Bytes
/
pg-example3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
❯ npm run pg-overdraft-protection-demo
> [email protected] pg-overdraft-protection-demo
> ./run-pg.sh overdraft-demo
testing with READ COMMITTED
transaction successfully committed! debited 200 from checking
you do not have sufficient balance to complete the transaction
result of 1 transaction
fulfilled
result of 2 transaction
fulfilled
final balances
v1 = -100, v2 = 100
testing with REPEATABLE READ
transaction successfully committed! debited 200 from checking
transaction successfully committed! debited 200 from saving
result of 1 transaction
fulfilled
result of 2 transaction
fulfilled
final balances
v1 = -100, v2 = -100
testing with SERIALIZABLE
transaction successfully committed! debited 200 from checking
SequelizeDatabaseError
40001
rolling back failed transaction...
result of 1 transaction
fulfilled
result of 2 transaction
rejected
final balances
v1 = -100, v2 = 100