Commit d6aaf61
authored
feat(spanner): add asynchronous code snippets and minor cleanup changes (#17337)
### 1. Partition Deserialization Simplification
Addressing post merge minor comments from:
#17014
2. Asynchronous Code Snippets & Integration Tests
New Async Samples (async_snippets.py): Added standard asynchronous code
snippets.
New Integration Tests (async_snippets_test.py): Introduced integration
tests using pytest-asyncio to sequentially execute and assert the output
of all five asynchronous code snippets against a mock/live instance.1 parent 5accbb4 commit d6aaf61Copy full SHA for d6aaf61
5 files changed
+197-24Lines changed: 197 additions & 24 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/google-cloud-spanner
- google/cloud/spanner_dbapi
- samples/samples
- tests
- mockserver_tests
- unit/spanner_dbapi
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/google-cloud-spanner/google/cloud/spanner_dbapi/partition_helper.py
Copy file name to clipboardExpand all lines: packages/google-cloud-spanner/google/cloud/spanner_dbapi/partition_helper.py+1-20Lines changed: 1 addition & 20 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
90 | 90 | |
91 | 91 | |
92 | 92 | |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
110 | 93 | |
111 | 94 | |
112 | 95 | |
| ||
124 | 107 | |
125 | 108 | |
126 | 109 | |
127 | | - |
128 | | - |
129 | | - |
| 110 | + |
130 | 111 | |
131 | 112 | |
132 | 113 | |
|
Collapse file
packages/google-cloud-spanner/samples/samples/async_snippets.py
Copy file name to clipboard+117Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 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 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
Collapse file
packages/google-cloud-spanner/samples/samples/async_snippets_test.py
Copy file name to clipboard+77Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 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 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
Collapse file
packages/google-cloud-spanner/tests/mockserver_tests/test_dbapi_partition_query.py
Copy file name to clipboardExpand all lines: packages/google-cloud-spanner/tests/mockserver_tests/test_dbapi_partition_query.py+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
2 | | - |
| 1 | + |
3 | 2 | |
4 | 3 | |
5 | 4 | |
|
Collapse file
packages/google-cloud-spanner/tests/unit/spanner_dbapi/test_partition_helper.py
Copy file name to clipboardExpand all lines: packages/google-cloud-spanner/tests/unit/spanner_dbapi/test_partition_helper.py+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | | - |
2 | | - |
| 1 | + |
3 | 2 | |
4 | 3 | |
5 | 4 | |
|
0 commit comments