Commit 570fb96
authored
feat: support savepoints (#796)
* feat: support savepoints Add support for emulated savepoints. Setting and releasing savepoints work in all cases. Rolling back to a savepoint is not guaranteed to work, as the underlying implementation will rollback the entire transaction and retry up to where the savepoint was set. Note that the retry will only be executed if the transaction is actually used after the rollback. * docs: update documentation * test: add tests and documentation * fix: update license header1 parent e0b48ee commit 570fb96
File tree
10 files changed
+706
-36
lines changed- docs
- samples/python
- sqlalchemy-sample
- sqlalchemy2-sample
- src
- main/java/com/google/cloud/spanner/pgadapter
- error
- statements
- test
- java/com/google/cloud/spanner/pgadapter
- python/psycopg3
- python/psycopg3
10 files changed
+706
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
608 | 617 | | |
609 | 618 | | |
610 | 619 | | |
| |||
623 | 632 | | |
624 | 633 | | |
625 | 634 | | |
626 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
627 | 645 | | |
628 | 646 | | |
629 | 647 | | |
| |||
642 | 660 | | |
643 | 661 | | |
644 | 662 | | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
650 | 672 | | |
651 | 673 | | |
652 | 674 | | |
| |||
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| |||
4678 | 4677 | | |
4679 | 4678 | | |
4680 | 4679 | | |
4681 | | - | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
4682 | 4686 | | |
4683 | 4687 | | |
4684 | 4688 | | |
4685 | 4689 | | |
4686 | 4690 | | |
4687 | 4691 | | |
4688 | 4692 | | |
4689 | | - | |
| 4693 | + | |
4690 | 4694 | | |
4691 | 4695 | | |
4692 | 4696 | | |
4693 | 4697 | | |
4694 | 4698 | | |
4695 | 4699 | | |
4696 | 4700 | | |
4697 | | - | |
| 4701 | + | |
4698 | 4702 | | |
4699 | 4703 | | |
4700 | 4704 | | |
| |||
4703 | 4707 | | |
4704 | 4708 | | |
4705 | 4709 | | |
4706 | | - | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
| 4710 | + | |
| 4711 | + | |
4710 | 4712 | | |
4711 | 4713 | | |
4712 | 4714 | | |
| |||
0 commit comments