File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 25
25
if depth == 0 {
26
26
inner. send ( "BEGIN" ) . await ?;
27
27
} else {
28
+ let stmt = format ! ( "SAVEPOINT _sqlx_savepoint_{}" , depth) ;
29
+
28
30
inner
29
- . send ( & format ! ( "SAVEPOINT _sqlx_savepoint_{}" , depth ) )
31
+ . send ( & stmt )
30
32
. await ?;
31
33
}
32
34
47
49
if depth == 1 {
48
50
inner. send ( "COMMIT" ) . await ?;
49
51
} else {
52
+ let stmt = format ! ( "RELEASE SAVEPOINT _sqlx_savepoint_{}" , depth - 1 ) ;
53
+
50
54
inner
51
- . send ( & format ! ( "RELEASE SAVEPOINT _sqlx_savepoint_{}" , depth - 1 ) )
55
+ . send ( & stmt )
52
56
. await ?;
53
57
}
54
58
@@ -62,11 +66,13 @@ where
62
66
if depth == 1 {
63
67
inner. send ( "ROLLBACK" ) . await ?;
64
68
} else {
69
+ let stmt = format ! (
70
+ "ROLLBACK TO SAVEPOINT _sqlx_savepoint_{}" ,
71
+ depth - 1
72
+ ) ;
73
+
65
74
inner
66
- . send ( & format ! (
67
- "ROLLBACK TO SAVEPOINT _sqlx_savepoint_{}" ,
68
- depth - 1
69
- ) )
75
+ . send ( & stmt)
70
76
. await ?;
71
77
}
72
78
You can’t perform that action at this time.
0 commit comments