activerecord-spanner-adapter 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/acceptance-tests-on-emulator.yaml +9 -13
- data/.github/workflows/acceptance-tests-on-production.yaml +4 -3
- data/.github/workflows/ci.yaml +8 -12
- data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +9 -13
- data/.github/workflows/nightly-acceptance-tests-on-production.yaml +4 -3
- data/.github/workflows/nightly-unit-tests.yaml +8 -12
- data/.github/workflows/rubocop.yaml +3 -3
- data/.github/workflows/samples.yaml +8 -12
- data/.gitignore +0 -1
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +2 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +12 -22
- data/Gemfile.lock +479 -0
- data/acceptance/cases/migration/change_table_test.rb +4 -14
- data/acceptance/cases/models/generated_column_test.rb +8 -26
- data/acceptance/test_helper.rb +10 -22
- data/activerecord-spanner-adapter.gemspec +2 -1
- data/benchmarks/db/migrate/01_create_tables.rb +1 -1
- data/examples/rails/README.md +1 -1
- data/examples/snippets/Rakefile +0 -7
- data/examples/snippets/array-data-type/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/batch-dml/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/bulk-insert/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/commit-timestamp/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/create-records/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/date-data-type/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/generated-column/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/hints/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/interleaved-tables/README.md +2 -5
- data/examples/snippets/isolation-level/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/migrations/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/mutations/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/optimistic-locking/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/query-logs/application.rb +3 -3
- data/examples/snippets/query-logs/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/quickstart/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/stale-reads/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/tags/db/migrate/01_create_tables.rb +1 -1
- data/examples/snippets/timestamp-data-type/db/migrate/01_create_tables.rb +1 -1
- data/gemfiles/7.1.gemfile +18 -0
- data/gemfiles/7.1.gemfile.lock +389 -0
- data/gemfiles/7.2.gemfile +18 -0
- data/gemfiles/7.2.gemfile.lock +479 -0
- data/gemfiles/8.0.gemfile +18 -0
- data/gemfiles/8.0.gemfile.lock +480 -0
- data/gemfiles/8.1.gemfile +18 -0
- data/gemfiles/8.1.gemfile.lock +478 -0
- data/lib/active_record/connection_adapters/spanner/database_statements.rb +62 -95
- data/lib/active_record/connection_adapters/spanner/quoting.rb +0 -22
- data/lib/active_record/connection_adapters/spanner/schema_creation.rb +3 -15
- data/lib/active_record/connection_adapters/spanner/schema_statements.rb +0 -4
- data/lib/active_record/connection_adapters/spanner_adapter.rb +12 -14
- data/lib/active_record/type/spanner/spanner_active_record_converter.rb +33 -2
- data/lib/activerecord_spanner_adapter/base.rb +5 -27
- data/lib/activerecord_spanner_adapter/connection.rb +0 -20
- data/lib/activerecord_spanner_adapter/information_schema.rb +1 -4
- data/lib/activerecord_spanner_adapter/table.rb +0 -22
- data/lib/activerecord_spanner_adapter/version.rb +1 -1
- data/lib/arel/visitors/spanner.rb +12 -15
- data/lib/spanner_client_ext.rb +6 -2
- metadata +27 -17
- data/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb +0 -221
- data/acceptance/cases/models/interleave_test.rb +0 -113
- data/acceptance/cases/transactions/optimistic_locking_test.rb +0 -152
- data/acceptance/models/album.rb +0 -15
- data/acceptance/models/track.rb +0 -23
- data/examples/snippets/interleaved-tables-before-7.1/README.md +0 -167
- data/examples/snippets/interleaved-tables-before-7.1/Rakefile +0 -13
- data/examples/snippets/interleaved-tables-before-7.1/application.rb +0 -122
- data/examples/snippets/interleaved-tables-before-7.1/config/database.yml +0 -9
- data/examples/snippets/interleaved-tables-before-7.1/db/migrate/01_create_tables.rb +0 -44
- data/examples/snippets/interleaved-tables-before-7.1/db/seeds.rb +0 -40
- data/examples/snippets/interleaved-tables-before-7.1/models/album.rb +0 -20
- data/examples/snippets/interleaved-tables-before-7.1/models/singer.rb +0 -18
- data/examples/snippets/interleaved-tables-before-7.1/models/track.rb +0 -28
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
activerecord-spanner-adapter (2.6.0)
|
|
5
|
+
activerecord (>= 7.1, < 9)
|
|
6
|
+
google-cloud-spanner (~> 2.25)
|
|
7
|
+
google-cloud-spanner-v1 (~> 1.7)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (8.1.3.1)
|
|
13
|
+
activesupport (= 8.1.3.1)
|
|
14
|
+
activerecord (8.1.3.1)
|
|
15
|
+
activemodel (= 8.1.3.1)
|
|
16
|
+
activesupport (= 8.1.3.1)
|
|
17
|
+
timeout (>= 0.4.0)
|
|
18
|
+
activesupport (8.1.3.1)
|
|
19
|
+
base64
|
|
20
|
+
bigdecimal
|
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
22
|
+
connection_pool (>= 2.2.5)
|
|
23
|
+
drb
|
|
24
|
+
i18n (>= 1.6, < 2)
|
|
25
|
+
json
|
|
26
|
+
logger (>= 1.4.2)
|
|
27
|
+
minitest (>= 5.1)
|
|
28
|
+
securerandom (>= 0.3)
|
|
29
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
30
|
+
uri (>= 0.13.1)
|
|
31
|
+
addressable (2.9.0)
|
|
32
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
33
|
+
appraisal (2.5.0)
|
|
34
|
+
bundler
|
|
35
|
+
rake
|
|
36
|
+
thor (>= 0.14.0)
|
|
37
|
+
ast (2.4.3)
|
|
38
|
+
autotest-suffix (1.1.0)
|
|
39
|
+
base64 (0.3.0)
|
|
40
|
+
bigdecimal (3.3.1)
|
|
41
|
+
byebug (13.0.0)
|
|
42
|
+
reline (>= 0.6.0)
|
|
43
|
+
coderay (1.1.3)
|
|
44
|
+
concurrent-ruby (1.3.8)
|
|
45
|
+
connection_pool (3.0.2)
|
|
46
|
+
docile (1.4.1)
|
|
47
|
+
docker-api (2.4.0)
|
|
48
|
+
excon (>= 0.64.0)
|
|
49
|
+
multi_json
|
|
50
|
+
drb (2.2.3)
|
|
51
|
+
erb (6.0.6)
|
|
52
|
+
excon (1.6.0)
|
|
53
|
+
logger
|
|
54
|
+
faraday (2.14.3)
|
|
55
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
56
|
+
json
|
|
57
|
+
logger
|
|
58
|
+
faraday-net_http (3.4.4)
|
|
59
|
+
net-http (~> 0.5)
|
|
60
|
+
faraday-retry (2.4.0)
|
|
61
|
+
faraday (~> 2.0)
|
|
62
|
+
gapic-common (1.3.0)
|
|
63
|
+
faraday (>= 1.9, < 3.a)
|
|
64
|
+
faraday-retry (>= 1.0, < 3.a)
|
|
65
|
+
google-cloud-env (~> 2.2)
|
|
66
|
+
google-logging-utils (~> 0.1)
|
|
67
|
+
google-protobuf (~> 4.26)
|
|
68
|
+
googleapis-common-protos (~> 1.6)
|
|
69
|
+
googleapis-common-protos-types (~> 1.15)
|
|
70
|
+
googleauth (~> 1.12)
|
|
71
|
+
grpc (~> 1.66)
|
|
72
|
+
google-cloud-core (1.9.0)
|
|
73
|
+
google-cloud-env (>= 1.0, < 3.a)
|
|
74
|
+
google-cloud-errors (~> 1.0)
|
|
75
|
+
google-cloud-env (2.4.0)
|
|
76
|
+
base64 (~> 0.2)
|
|
77
|
+
faraday (>= 1.0, < 3.a)
|
|
78
|
+
google-cloud-errors (1.7.0)
|
|
79
|
+
google-cloud-spanner (2.36.0)
|
|
80
|
+
bigdecimal (~> 3.0)
|
|
81
|
+
concurrent-ruby (~> 1.0)
|
|
82
|
+
google-cloud-core (~> 1.7)
|
|
83
|
+
google-cloud-spanner-admin-database-v1 (~> 1.4)
|
|
84
|
+
google-cloud-spanner-admin-instance-v1 (~> 1.6)
|
|
85
|
+
google-cloud-spanner-v1 (~> 1.6)
|
|
86
|
+
google-cloud-spanner-admin-database-v1 (1.6.1)
|
|
87
|
+
gapic-common (>= 0.25.0, < 2.a)
|
|
88
|
+
google-cloud-errors (~> 1.0)
|
|
89
|
+
grpc-google-iam-v1 (~> 1.1)
|
|
90
|
+
google-cloud-spanner-admin-instance-v1 (1.6.0)
|
|
91
|
+
gapic-common (>= 0.25.0, < 2.a)
|
|
92
|
+
google-cloud-errors (~> 1.0)
|
|
93
|
+
grpc-google-iam-v1 (~> 1.1)
|
|
94
|
+
google-cloud-spanner-v1 (1.19.0)
|
|
95
|
+
gapic-common (~> 1.3)
|
|
96
|
+
google-cloud-errors (~> 1.0)
|
|
97
|
+
google-logging-utils (0.2.0)
|
|
98
|
+
google-protobuf (4.35.1)
|
|
99
|
+
bigdecimal
|
|
100
|
+
rake (~> 13.3)
|
|
101
|
+
google-protobuf (4.35.1-aarch64-linux-gnu)
|
|
102
|
+
bigdecimal
|
|
103
|
+
rake (~> 13.3)
|
|
104
|
+
google-protobuf (4.35.1-aarch64-linux-musl)
|
|
105
|
+
bigdecimal
|
|
106
|
+
rake (~> 13.3)
|
|
107
|
+
google-protobuf (4.35.1-arm64-darwin)
|
|
108
|
+
bigdecimal
|
|
109
|
+
rake (~> 13.3)
|
|
110
|
+
google-protobuf (4.35.1-x86-linux-gnu)
|
|
111
|
+
bigdecimal
|
|
112
|
+
rake (~> 13.3)
|
|
113
|
+
google-protobuf (4.35.1-x86-linux-musl)
|
|
114
|
+
bigdecimal
|
|
115
|
+
rake (~> 13.3)
|
|
116
|
+
google-protobuf (4.35.1-x86_64-darwin)
|
|
117
|
+
bigdecimal
|
|
118
|
+
rake (~> 13.3)
|
|
119
|
+
google-protobuf (4.35.1-x86_64-linux-gnu)
|
|
120
|
+
bigdecimal
|
|
121
|
+
rake (~> 13.3)
|
|
122
|
+
google-protobuf (4.35.1-x86_64-linux-musl)
|
|
123
|
+
bigdecimal
|
|
124
|
+
rake (~> 13.3)
|
|
125
|
+
google-style (1.32.0)
|
|
126
|
+
rubocop (~> 1.76)
|
|
127
|
+
googleapis-common-protos (1.10.0)
|
|
128
|
+
google-protobuf (~> 4.26)
|
|
129
|
+
googleapis-common-protos-types (~> 1.21)
|
|
130
|
+
grpc (~> 1.41)
|
|
131
|
+
googleapis-common-protos-types (1.23.0)
|
|
132
|
+
google-protobuf (~> 4.26)
|
|
133
|
+
googleauth (1.17.3)
|
|
134
|
+
faraday (>= 1.0, < 3.a)
|
|
135
|
+
google-cloud-env (~> 2.2)
|
|
136
|
+
google-logging-utils (~> 0.1)
|
|
137
|
+
jwt (>= 1.4, < 4.0)
|
|
138
|
+
os (>= 0.9, < 2.0)
|
|
139
|
+
pstore (~> 0.1)
|
|
140
|
+
signet (>= 0.16, < 2.a)
|
|
141
|
+
grpc (1.83.0)
|
|
142
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
143
|
+
googleapis-common-protos-types (~> 1.0)
|
|
144
|
+
grpc (1.83.0-aarch64-linux-gnu)
|
|
145
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
146
|
+
googleapis-common-protos-types (~> 1.0)
|
|
147
|
+
grpc (1.83.0-aarch64-linux-musl)
|
|
148
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
149
|
+
googleapis-common-protos-types (~> 1.0)
|
|
150
|
+
grpc (1.83.0-arm64-darwin)
|
|
151
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
152
|
+
googleapis-common-protos-types (~> 1.0)
|
|
153
|
+
grpc (1.83.0-x86-linux-gnu)
|
|
154
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
155
|
+
googleapis-common-protos-types (~> 1.0)
|
|
156
|
+
grpc (1.83.0-x86-linux-musl)
|
|
157
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
158
|
+
googleapis-common-protos-types (~> 1.0)
|
|
159
|
+
grpc (1.83.0-x86_64-darwin)
|
|
160
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
161
|
+
googleapis-common-protos-types (~> 1.0)
|
|
162
|
+
grpc (1.83.0-x86_64-linux-gnu)
|
|
163
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
164
|
+
googleapis-common-protos-types (~> 1.0)
|
|
165
|
+
grpc (1.83.0-x86_64-linux-musl)
|
|
166
|
+
google-protobuf (>= 3.25, < 5.0)
|
|
167
|
+
googleapis-common-protos-types (~> 1.0)
|
|
168
|
+
grpc-google-iam-v1 (1.10.0)
|
|
169
|
+
google-protobuf (>= 3.18, < 5.a)
|
|
170
|
+
googleapis-common-protos (~> 1.4)
|
|
171
|
+
grpc (~> 1.41)
|
|
172
|
+
i18n (1.15.2)
|
|
173
|
+
concurrent-ruby (~> 1.0)
|
|
174
|
+
io-console (0.8.2)
|
|
175
|
+
irb (1.18.0)
|
|
176
|
+
pp (>= 0.6.0)
|
|
177
|
+
prism (>= 1.3.0)
|
|
178
|
+
rdoc (>= 4.0.0)
|
|
179
|
+
reline (>= 0.4.2)
|
|
180
|
+
json (2.21.2)
|
|
181
|
+
jwt (3.2.0)
|
|
182
|
+
base64
|
|
183
|
+
language_server-protocol (3.17.0.6)
|
|
184
|
+
lint_roller (1.1.0)
|
|
185
|
+
logger (1.7.0)
|
|
186
|
+
method_source (1.1.0)
|
|
187
|
+
minitest (5.27.0)
|
|
188
|
+
minitest-autotest (1.2.0)
|
|
189
|
+
minitest-server (~> 1.0)
|
|
190
|
+
path_expander (~> 2.0)
|
|
191
|
+
minitest-focus (1.4.1)
|
|
192
|
+
minitest (> 5.0)
|
|
193
|
+
minitest-rg (5.4.0)
|
|
194
|
+
minitest (>= 5.0, < 7)
|
|
195
|
+
minitest-server (1.0.10)
|
|
196
|
+
drb (~> 2.0)
|
|
197
|
+
minitest (~> 5.16)
|
|
198
|
+
multi_json (1.21.1)
|
|
199
|
+
mustermann (3.1.1)
|
|
200
|
+
mutex_m (0.3.0)
|
|
201
|
+
net-http (0.9.1)
|
|
202
|
+
uri (>= 0.11.1)
|
|
203
|
+
os (1.1.4)
|
|
204
|
+
ostruct (0.6.3)
|
|
205
|
+
parallel (1.28.0)
|
|
206
|
+
parser (3.3.12.0)
|
|
207
|
+
ast (~> 2.4.1)
|
|
208
|
+
racc
|
|
209
|
+
path_expander (2.0.1)
|
|
210
|
+
pp (0.6.4)
|
|
211
|
+
prettyprint
|
|
212
|
+
prettyprint (0.2.0)
|
|
213
|
+
prism (1.9.0)
|
|
214
|
+
pry (0.16.0)
|
|
215
|
+
coderay (~> 1.1)
|
|
216
|
+
method_source (~> 1.0)
|
|
217
|
+
reline (>= 0.6.0)
|
|
218
|
+
pry-byebug (3.12.0)
|
|
219
|
+
byebug (~> 13.0)
|
|
220
|
+
pry (>= 0.13, < 0.17)
|
|
221
|
+
pstore (0.2.1)
|
|
222
|
+
public_suffix (7.0.5)
|
|
223
|
+
racc (1.8.1)
|
|
224
|
+
rack (3.2.6)
|
|
225
|
+
rack-protection (4.2.1)
|
|
226
|
+
base64 (>= 0.1.0)
|
|
227
|
+
logger (>= 1.6.0)
|
|
228
|
+
rack (>= 3.0.0, < 4)
|
|
229
|
+
rack-session (2.1.2)
|
|
230
|
+
base64 (>= 0.1.0)
|
|
231
|
+
rack (>= 3.0.0)
|
|
232
|
+
rainbow (3.1.1)
|
|
233
|
+
rake (13.4.2)
|
|
234
|
+
rbs (4.1.2)
|
|
235
|
+
logger
|
|
236
|
+
prism (>= 1.6.0)
|
|
237
|
+
tsort
|
|
238
|
+
rdoc (8.0.0)
|
|
239
|
+
erb
|
|
240
|
+
prism (>= 1.6.0)
|
|
241
|
+
rbs (>= 4.0.0)
|
|
242
|
+
tsort
|
|
243
|
+
readline (0.0.4)
|
|
244
|
+
reline
|
|
245
|
+
redcarpet (3.6.1)
|
|
246
|
+
regexp_parser (2.12.0)
|
|
247
|
+
reline (0.6.3)
|
|
248
|
+
io-console (~> 0.5)
|
|
249
|
+
rubocop (1.88.2)
|
|
250
|
+
json (~> 2.3)
|
|
251
|
+
language_server-protocol (~> 3.17.0.2)
|
|
252
|
+
lint_roller (~> 1.1.0)
|
|
253
|
+
parallel (>= 1.10)
|
|
254
|
+
parser (>= 3.3.0.2)
|
|
255
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
256
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
257
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
258
|
+
ruby-progressbar (~> 1.7)
|
|
259
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
260
|
+
rubocop-ast (1.50.0)
|
|
261
|
+
parser (>= 3.3.7.2)
|
|
262
|
+
prism (~> 1.7)
|
|
263
|
+
ruby-progressbar (1.13.0)
|
|
264
|
+
securerandom (0.4.1)
|
|
265
|
+
signet (0.22.0)
|
|
266
|
+
addressable (~> 2.8)
|
|
267
|
+
faraday (>= 0.17.5, < 3.a)
|
|
268
|
+
jwt (>= 1.5, < 4.0)
|
|
269
|
+
simplecov (0.22.0)
|
|
270
|
+
docile (~> 1.1)
|
|
271
|
+
simplecov-html (~> 0.11)
|
|
272
|
+
simplecov_json_formatter (~> 0.1)
|
|
273
|
+
simplecov-html (0.13.2)
|
|
274
|
+
simplecov_json_formatter (0.1.4)
|
|
275
|
+
sinatra (4.2.1)
|
|
276
|
+
logger (>= 1.6.0)
|
|
277
|
+
mustermann (~> 3.0)
|
|
278
|
+
rack (>= 3.0.0, < 4)
|
|
279
|
+
rack-protection (= 4.2.1)
|
|
280
|
+
rack-session (>= 2.0.0, < 3)
|
|
281
|
+
tilt (~> 2.0)
|
|
282
|
+
sinatra-activerecord (2.0.28)
|
|
283
|
+
activerecord (>= 4.1)
|
|
284
|
+
sinatra (>= 1.0)
|
|
285
|
+
sqlite3 (2.9.5-aarch64-linux-gnu)
|
|
286
|
+
sqlite3 (2.9.5-aarch64-linux-musl)
|
|
287
|
+
sqlite3 (2.9.5-arm-linux-gnu)
|
|
288
|
+
sqlite3 (2.9.5-arm-linux-musl)
|
|
289
|
+
sqlite3 (2.9.5-arm64-darwin)
|
|
290
|
+
sqlite3 (2.9.5-x86-linux-gnu)
|
|
291
|
+
sqlite3 (2.9.5-x86-linux-musl)
|
|
292
|
+
sqlite3 (2.9.5-x86_64-darwin)
|
|
293
|
+
sqlite3 (2.9.5-x86_64-linux-gnu)
|
|
294
|
+
sqlite3 (2.9.5-x86_64-linux-musl)
|
|
295
|
+
thor (1.5.0)
|
|
296
|
+
tilt (2.8.0)
|
|
297
|
+
timeout (0.6.1)
|
|
298
|
+
tsort (0.2.0)
|
|
299
|
+
tzinfo (2.0.6)
|
|
300
|
+
concurrent-ruby (~> 1.0)
|
|
301
|
+
unicode-display_width (3.2.0)
|
|
302
|
+
unicode-emoji (~> 4.1)
|
|
303
|
+
unicode-emoji (4.2.0)
|
|
304
|
+
uri (1.1.1)
|
|
305
|
+
yard (0.9.45)
|
|
306
|
+
yard-doctest (0.1.17)
|
|
307
|
+
minitest
|
|
308
|
+
yard
|
|
309
|
+
|
|
310
|
+
PLATFORMS
|
|
311
|
+
aarch64-linux-gnu
|
|
312
|
+
aarch64-linux-musl
|
|
313
|
+
arm-linux-gnu
|
|
314
|
+
arm-linux-musl
|
|
315
|
+
arm64-darwin
|
|
316
|
+
x86-linux-gnu
|
|
317
|
+
x86-linux-musl
|
|
318
|
+
x86_64-darwin
|
|
319
|
+
x86_64-linux-gnu
|
|
320
|
+
x86_64-linux-musl
|
|
321
|
+
|
|
322
|
+
DEPENDENCIES
|
|
323
|
+
activerecord (~> 8.1.0)
|
|
324
|
+
activerecord-spanner-adapter!
|
|
325
|
+
appraisal (~> 2.5)
|
|
326
|
+
autotest-suffix (~> 1.1)
|
|
327
|
+
bundler (>= 2.0, < 5.0)
|
|
328
|
+
docker-api
|
|
329
|
+
google-style (~> 1.32.0)
|
|
330
|
+
irb
|
|
331
|
+
minitest (~> 5.27.0)
|
|
332
|
+
minitest-autotest (~> 1.0)
|
|
333
|
+
minitest-focus (~> 1.1)
|
|
334
|
+
minitest-rg (~> 5.4.0)
|
|
335
|
+
mutex_m
|
|
336
|
+
ostruct
|
|
337
|
+
pry (~> 0.16.0)
|
|
338
|
+
pry-byebug (~> 3.12.0)
|
|
339
|
+
rake (~> 13.0)
|
|
340
|
+
readline
|
|
341
|
+
redcarpet (~> 3.0)
|
|
342
|
+
simplecov (~> 0.9)
|
|
343
|
+
sinatra-activerecord
|
|
344
|
+
sqlite3
|
|
345
|
+
yard (~> 0.9)
|
|
346
|
+
yard-doctest (~> 0.1.13)
|
|
347
|
+
|
|
348
|
+
CHECKSUMS
|
|
349
|
+
activemodel (8.1.3.1) sha256=99cc02ce2faec371d14440949d85787ebd23a907c9baef0a9d4bcd4d21888f88
|
|
350
|
+
activerecord (8.1.3.1) sha256=0a2fb6c28f4938f6b013a3a549bec0a7e37d535f3dc8990e804bcc3258c0403b
|
|
351
|
+
activerecord-spanner-adapter (2.6.0)
|
|
352
|
+
activesupport (8.1.3.1) sha256=85458765f25ea48b9019c46b6bb3fa5683197bf4280d9f06710a6e8d7a831376
|
|
353
|
+
addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
|
|
354
|
+
appraisal (2.5.0) sha256=36989221be127913b0dba8d114da2001e6b2dceea7bd4951200eaba764eed3ce
|
|
355
|
+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
356
|
+
autotest-suffix (1.1.0) sha256=9bb29331b7b66a9659b01ef10839bd61fc1a6e95477c8ea710bd01e10c380977
|
|
357
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
358
|
+
bigdecimal (3.3.1) sha256=eaa01e228be54c4f9f53bf3cc34fe3d5e845c31963e7fcc5bedb05a4e7d52218
|
|
359
|
+
bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8
|
|
360
|
+
byebug (13.0.0) sha256=d2263efe751941ca520fa29744b71972d39cbc41839496706f5d9b22e92ae05d
|
|
361
|
+
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
362
|
+
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
363
|
+
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
364
|
+
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
365
|
+
docker-api (2.4.0) sha256=824be734f4cc8718189be9c8e795b6414acbbf7e8b082a06f959a27dd8dd63e6
|
|
366
|
+
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
367
|
+
erb (6.0.6) sha256=a9b24986700f5bf127c4f297c5403c3ca41b83b0a316c0cd09a096b56e644ae5
|
|
368
|
+
excon (1.6.0) sha256=ebe2ab83c055ef8e117c62c91a3535b966a59a64868188219d49ab90cd83b65f
|
|
369
|
+
faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278
|
|
370
|
+
faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588
|
|
371
|
+
faraday-retry (2.4.0) sha256=7b79c48fb7e56526faf247b12d94a680071ff40c9fda7cf1ec1549439ad11ebe
|
|
372
|
+
gapic-common (1.3.0) sha256=4e5d9be1effb7366e2cda13c0f44922285d5613ac8de8b9b18c2c835fe4faa91
|
|
373
|
+
google-cloud-core (1.9.0) sha256=ab55409f51488e8deefb6edcc1ce4771dfb5da2fe7b3bc075709a030c2b682a4
|
|
374
|
+
google-cloud-env (2.4.0) sha256=01cb35ecee5d1c4d1cd4deaed8bb5bddc838e296bcc2a35c5d1ddd07ce40d28d
|
|
375
|
+
google-cloud-errors (1.7.0) sha256=6e682f42d89aae08689f36f28495de629d756da076bafff0003bac7f8042ebb3
|
|
376
|
+
google-cloud-spanner (2.36.0) sha256=91abbf55d6ce8e054edd838977a907152ff9ff491f34690409bbe6b9a82c0c5c
|
|
377
|
+
google-cloud-spanner-admin-database-v1 (1.6.1) sha256=6b8758e4def80d69e9ee64a42078d3a59ab028a638f7a849abd8130cf85add9b
|
|
378
|
+
google-cloud-spanner-admin-instance-v1 (1.6.0) sha256=1775b56518665854b27af393378761e6ff9b12156d746168df7bb14ce0138d54
|
|
379
|
+
google-cloud-spanner-v1 (1.19.0) sha256=f5b03cdd753f70e0977c3f71a7fc61ff0f188957f8dda54a289fd8dc09c4b1bd
|
|
380
|
+
google-logging-utils (0.2.0) sha256=675462b4ea5affa825a3442694ca2d75d0069455a1d0956127207498fca3df7b
|
|
381
|
+
google-protobuf (4.35.1) sha256=a3a6471331d918f58dfa4d014a8f6286f0af2cf4840216bde52fcf2ea3fe3726
|
|
382
|
+
google-protobuf (4.35.1-aarch64-linux-gnu) sha256=50ca44d0eeff3f8475e630a1accdd974256f3510694d574e2c9d6119ea8bc9e1
|
|
383
|
+
google-protobuf (4.35.1-aarch64-linux-musl) sha256=d5c65cef6bd6498a9e5ed5f88cf6cf7e341c10b0a005e32137d5d1a2b6e8c18a
|
|
384
|
+
google-protobuf (4.35.1-arm64-darwin) sha256=d9c957df04fa89c749fa9a72a7b383eb4296efc9b2303dc6fd6fbe39c698ad6b
|
|
385
|
+
google-protobuf (4.35.1-x86-linux-gnu) sha256=cc7492566b27ad8b5dfa3a7b6f9b11e905050cc53c2fa8ff22de375a9e7a70fb
|
|
386
|
+
google-protobuf (4.35.1-x86-linux-musl) sha256=ab403790b59e4dc588ffbed1eaacf05d4ca2f0d12ac9c13d6c64e69380d8c99e
|
|
387
|
+
google-protobuf (4.35.1-x86_64-darwin) sha256=66b62b4df00931018a692806df66393efa960d6d2b7da69735187249f950d3ee
|
|
388
|
+
google-protobuf (4.35.1-x86_64-linux-gnu) sha256=c786439087512a3fbd199e9897d265b855f951d4027e218ea55e858d45969edd
|
|
389
|
+
google-protobuf (4.35.1-x86_64-linux-musl) sha256=91890eb0002934a339fdb7d77a147c46b7474b6799db27872b747b905837f744
|
|
390
|
+
google-style (1.32.0) sha256=3b13068979e5b8caa067ecce9bf818b6cf0e5eb706ead41c5b905f237d9bfb01
|
|
391
|
+
googleapis-common-protos (1.10.0) sha256=13e47ad0ce85d3d30065c03863efd302a82b0e08ba576f2a9b9dbbfeecb57ee0
|
|
392
|
+
googleapis-common-protos-types (1.23.0) sha256=992e740a523794d9fc5f29a504465d8fc737aaa16c930fe7228e3346860faf0a
|
|
393
|
+
googleauth (1.17.3) sha256=9a655455885c0c17a8b70537acd2a992a7c7842c43c06c6612dfb0d93e755d58
|
|
394
|
+
grpc (1.83.0) sha256=38119e7f9f7cbc98e79145201da4be470a7542b0befad454651d35015ea55c59
|
|
395
|
+
grpc (1.83.0-aarch64-linux-gnu) sha256=11562efdded494b2277fd9c3c530dfdf90177faa111526ae9e748d0be29f1a9d
|
|
396
|
+
grpc (1.83.0-aarch64-linux-musl) sha256=ee745eab4f3922ed27d379cbc4bc0a99e58db367fa96312e9fe258aafd3afeb2
|
|
397
|
+
grpc (1.83.0-arm64-darwin) sha256=25dd772aa80529f014d70da069787cd39b469c9edacbe493da4ff19952a147e2
|
|
398
|
+
grpc (1.83.0-x86-linux-gnu) sha256=e9b20f54b8e8915f3921f12b266742e79da2c31d60e88295e15d0d16ea3cfd55
|
|
399
|
+
grpc (1.83.0-x86-linux-musl) sha256=868e66d9c2a77eca1a93292fd879565219821fb5888673aedd08154303c9520c
|
|
400
|
+
grpc (1.83.0-x86_64-darwin) sha256=cfad91d559d1907159a5247fb12dc112a8ea0ebe2027ca7f5ab648d01a645716
|
|
401
|
+
grpc (1.83.0-x86_64-linux-gnu) sha256=25d66bfa3cb1b05258b3f9632478c7e7ceb52cb16ccc0b4b26d7df36be7158b1
|
|
402
|
+
grpc (1.83.0-x86_64-linux-musl) sha256=a5023264dbb8038c23b147bbf80adb06932ef11b5ab493412e9e37a43114fa8c
|
|
403
|
+
grpc-google-iam-v1 (1.10.0) sha256=13a4ace4f7495b913f202880a5431f7e53633af3dd6d7df8c4224bd2dac23a9a
|
|
404
|
+
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
405
|
+
io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
|
|
406
|
+
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
|
|
407
|
+
json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
|
|
408
|
+
jwt (3.2.0) sha256=5419b1fe37b1da0982bd07051f573a8b8789ab724c2aa7e785e4784a3ed217d7
|
|
409
|
+
language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
|
|
410
|
+
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
411
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
412
|
+
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
|
|
413
|
+
minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
|
|
414
|
+
minitest-autotest (1.2.0) sha256=60d031cba705215450662b0060f03f96507682b346a19c27f6756751ad92d2b4
|
|
415
|
+
minitest-focus (1.4.1) sha256=394517cbe2dcb2d992d8ffc41a3b2b6315777a4daa69239de4fefe7110dd810e
|
|
416
|
+
minitest-rg (5.4.0) sha256=54d42bb8ce876381245be5866f3c1dd704ef79c06ba5c9ff280c0aa28c56effb
|
|
417
|
+
minitest-server (1.0.10) sha256=275439bf3ffc433fcbe161733248f1d9749ebf122892cf010bf864aaa95cef75
|
|
418
|
+
multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
|
|
419
|
+
mustermann (3.1.1) sha256=4c6170c7234d5499c345562ba7c7dfe73e1754286dcc1abb053064d66a127198
|
|
420
|
+
mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751
|
|
421
|
+
net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
|
|
422
|
+
os (1.1.4) sha256=57816d6a334e7bd6aed048f4b0308226c5fb027433b67d90a9ab435f35108d3f
|
|
423
|
+
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
|
|
424
|
+
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
|
|
425
|
+
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
|
|
426
|
+
path_expander (2.0.1) sha256=2de201164bff4719cc4d0b3767286e9977cc832a59c4d70abab571ec86cb41e4
|
|
427
|
+
pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
|
|
428
|
+
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
|
|
429
|
+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
430
|
+
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
|
|
431
|
+
pry-byebug (3.12.0) sha256=594e094ae8a8390a7ad4c7b36ae36e13304ed02664c67417d108dc5f7213d1b7
|
|
432
|
+
pstore (0.2.1) sha256=03904d0f2c66579e96d1e6704cdabc0c88df7ea8ed8782d9f3569f6f6c702c1a
|
|
433
|
+
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
|
|
434
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
435
|
+
rack (3.2.6) sha256=5ed78e1f73b2e25679bec7d45ee2d4483cc4146eb1be0264fc4d94cb5ef212c2
|
|
436
|
+
rack-protection (4.2.1) sha256=cf6e2842df8c55f5e4d1a4be015e603e19e9bc3a7178bae58949ccbb58558bac
|
|
437
|
+
rack-session (2.1.2) sha256=595434f8c0c3473ae7d7ac56ecda6cc6dfd9d37c0b2b5255330aa1576967ffe8
|
|
438
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
439
|
+
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
|
|
440
|
+
rbs (4.1.2) sha256=050eb1d8b508f1233bed929c0f2c7052302f7adf295230d9cb314e9024078f48
|
|
441
|
+
rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
|
|
442
|
+
readline (0.0.4) sha256=6138eef17be2b98298b672c3ea63bf9cb5158d401324f26e1e84f235879c1d6a
|
|
443
|
+
redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445
|
|
444
|
+
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
|
|
445
|
+
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
|
|
446
|
+
rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf
|
|
447
|
+
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
|
|
448
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
449
|
+
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
450
|
+
signet (0.22.0) sha256=b76d495ccb07ad35dbc89f3e920665a9d8ed717141955034005d7843dcfe4780
|
|
451
|
+
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
|
|
452
|
+
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
|
|
453
|
+
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
|
|
454
|
+
sinatra (4.2.1) sha256=b7aeb9b11d046b552972ade834f1f9be98b185fa8444480688e3627625377080
|
|
455
|
+
sinatra-activerecord (2.0.28) sha256=99f352c2dfa244d02b4f877efbe00135360b758390b8bb7bc2d4d91171c93811
|
|
456
|
+
sqlite3 (2.9.5-aarch64-linux-gnu) sha256=78075b6337d3d182c6d2b4691049ed45cd220826160c9ea18946bf6a1de200dc
|
|
457
|
+
sqlite3 (2.9.5-aarch64-linux-musl) sha256=18c801185deb4adc01ddb281e8f672a39e3d1729979ca91e39439cd3eac0402d
|
|
458
|
+
sqlite3 (2.9.5-arm-linux-gnu) sha256=1bdfca0c7d63998c60b0f4a8e3c8df2d33800ccc4abd2d612eddbbbc92a4c48b
|
|
459
|
+
sqlite3 (2.9.5-arm-linux-musl) sha256=bae1109d12b2e9f588455967729b008e1ff4feb7761749df695019c9079913c6
|
|
460
|
+
sqlite3 (2.9.5-arm64-darwin) sha256=d0cf444a70fc9395d513cfbcc1e6719e224aa645314e3824cb0474c721425aa2
|
|
461
|
+
sqlite3 (2.9.5-x86-linux-gnu) sha256=c94b96b16f17796be6fa099d15218b52e396f55690c4760faaaefa21ebab9dd5
|
|
462
|
+
sqlite3 (2.9.5-x86-linux-musl) sha256=063a8c13cbadfe7f29453b1706cbdf91fca4a78d244f816ff20bac4fb259f1e4
|
|
463
|
+
sqlite3 (2.9.5-x86_64-darwin) sha256=8e9caae38bd7ebb29cbeee3e7ab1d12dc2327d9a1b92c7fcf0dda05589627a81
|
|
464
|
+
sqlite3 (2.9.5-x86_64-linux-gnu) sha256=233dbcb6714148dd23bc5aeb33e8efd6eac974969564ddd5794c23d5f52b231e
|
|
465
|
+
sqlite3 (2.9.5-x86_64-linux-musl) sha256=e7d3a7474e8af0f96150c21abc203fbab5437206bfcdf11deab7741c0ca516f2
|
|
466
|
+
thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
|
|
467
|
+
tilt (2.8.0) sha256=ba472eb2716fe1e04112d6d219a9dae938ec09a6a1e2ad3ecc7922e79bde3721
|
|
468
|
+
timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
|
|
469
|
+
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
470
|
+
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
471
|
+
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
472
|
+
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
473
|
+
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
|
474
|
+
yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51
|
|
475
|
+
yard-doctest (0.1.17) sha256=7cb35a75d99f58fc42ee72d3542a36e227237b621a40aebc391c95988b72847f
|
|
476
|
+
|
|
477
|
+
BUNDLED WITH
|
|
478
|
+
4.0.14
|
|
@@ -13,9 +13,16 @@ module ActiveRecord
|
|
|
13
13
|
module ConnectionAdapters
|
|
14
14
|
module Spanner
|
|
15
15
|
module DatabaseStatements
|
|
16
|
-
VERSION_7_1_0 = Gem::Version.create "7.1.0"
|
|
17
16
|
RequestOptions = Google::Cloud::Spanner::V1::RequestOptions
|
|
18
17
|
TransactionMutationLimitExceededError = Google::Cloud::Spanner::Errors::TransactionMutationLimitExceededError
|
|
18
|
+
PARAM_KEYS = (1..950).map { |i| "p#{i}".freeze }.freeze
|
|
19
|
+
private_constant :PARAM_KEYS
|
|
20
|
+
REQUEST_TAG_PREFIXES = [
|
|
21
|
+
"/*request_tag:true,",
|
|
22
|
+
"/*_request_tag='true',",
|
|
23
|
+
"/*_request_tag:true,"
|
|
24
|
+
].freeze
|
|
25
|
+
private_constant :REQUEST_TAG_PREFIXES
|
|
19
26
|
|
|
20
27
|
# DDL, DML and DQL Statements
|
|
21
28
|
|
|
@@ -97,15 +104,10 @@ module ActiveRecord
|
|
|
97
104
|
end
|
|
98
105
|
|
|
99
106
|
def append_request_tag_from_query_logs sql, binds
|
|
100
|
-
|
|
101
|
-
"/*request_tag:true,",
|
|
102
|
-
"/*_request_tag='true',",
|
|
103
|
-
"/*_request_tag:true,",
|
|
104
|
-
"/*_request_tag='true',"
|
|
105
|
-
]
|
|
106
|
-
possible_prefixes.each do |prefix|
|
|
107
|
+
REQUEST_TAG_PREFIXES.each do |prefix|
|
|
107
108
|
if sql.start_with? prefix
|
|
108
109
|
append_request_tag_from_query_logs_with_format sql, binds, prefix
|
|
110
|
+
break
|
|
109
111
|
end
|
|
110
112
|
end
|
|
111
113
|
end
|
|
@@ -115,68 +117,38 @@ module ActiveRecord
|
|
|
115
117
|
return unless end_of_comment
|
|
116
118
|
|
|
117
119
|
request_tag = sql[prefix.length, end_of_comment - prefix.length]
|
|
118
|
-
options = binds.find { |bind| bind.is_a? RequestOptions }
|
|
119
|
-
if options
|
|
120
|
-
options.request_tag = request_tag
|
|
120
|
+
options = binds.find { |bind| bind.is_a? RequestOptions }
|
|
121
|
+
if options
|
|
122
|
+
options.request_tag = if options.request_tag.empty?
|
|
123
|
+
request_tag
|
|
124
|
+
else
|
|
125
|
+
"#{options.request_tag},#{request_tag}"
|
|
126
|
+
end
|
|
121
127
|
else
|
|
122
|
-
|
|
128
|
+
binds.append RequestOptions.new(request_tag: request_tag)
|
|
123
129
|
end
|
|
124
|
-
|
|
125
|
-
binds.append options
|
|
126
130
|
end
|
|
127
131
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
else
|
|
138
|
-
[pk]
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
if returning&.any?
|
|
142
|
-
returning_columns_statement = returning.map { |c| quote_column_name c }.join(", ")
|
|
143
|
-
sql = "#{sql} THEN RETURN #{returning_columns_statement}"
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
[sql, binds]
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def query sql, name = nil
|
|
150
|
-
exec_query sql, name
|
|
132
|
+
def sql_for_insert sql, pk, binds, returning
|
|
133
|
+
if pk && !_has_pk_binding(pk, binds)
|
|
134
|
+
# Add the primary key to the columns that should be returned if there is no value specified for it.
|
|
135
|
+
returning ||= []
|
|
136
|
+
returning |= if pk.respond_to? :each
|
|
137
|
+
pk
|
|
138
|
+
else
|
|
139
|
+
[pk]
|
|
140
|
+
end
|
|
151
141
|
end
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
if returning&.any?
|
|
143
|
+
returning_columns_statement = returning.map { |c| quote_column_name c }.join(", ")
|
|
144
|
+
sql = "#{sql} THEN RETURN #{returning_columns_statement}"
|
|
155
145
|
end
|
|
156
146
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
if result.respond_to? :fields
|
|
160
|
-
ActiveRecord::Result.new(
|
|
161
|
-
result.fields.keys.map(&:to_s), result.rows.map(&:values)
|
|
162
|
-
)
|
|
163
|
-
else
|
|
164
|
-
ActiveRecord::Result.new [], []
|
|
165
|
-
end
|
|
166
|
-
end
|
|
147
|
+
[sql, binds]
|
|
148
|
+
end
|
|
167
149
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
# Add the primary key to the columns that should be returned if there is no value specified for it.
|
|
171
|
-
returning_columns_statement = if pk.respond_to? :each
|
|
172
|
-
pk.map { |c| quote_column_name c }.join(", ")
|
|
173
|
-
else
|
|
174
|
-
quote_column_name pk
|
|
175
|
-
end
|
|
176
|
-
sql = "#{sql} THEN RETURN #{returning_columns_statement}" if returning_columns_statement
|
|
177
|
-
end
|
|
178
|
-
super
|
|
179
|
-
end
|
|
150
|
+
def query sql, name = nil
|
|
151
|
+
exec_query sql, name
|
|
180
152
|
end
|
|
181
153
|
|
|
182
154
|
def _has_pk_binding pk, binds
|
|
@@ -370,48 +342,43 @@ module ActiveRecord
|
|
|
370
342
|
private
|
|
371
343
|
|
|
372
344
|
# Translates binds to Spanner types and params.
|
|
373
|
-
def to_types_and_params binds
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
345
|
+
def to_types_and_params binds # rubocop:disable Metrics/AbcSize
|
|
346
|
+
return [{}, {}] if binds.empty?
|
|
347
|
+
|
|
348
|
+
converter = ActiveRecord::Type::Spanner::SpannerActiveRecordConverter
|
|
349
|
+
integer_type = ActiveModel::Type::Integer
|
|
350
|
+
types = {}
|
|
351
|
+
params = {}
|
|
352
|
+
index = 0
|
|
353
|
+
binds.each do |bind|
|
|
354
|
+
key = PARAM_KEYS[index] || "p#{index + 1}"
|
|
355
|
+
bind_value = bind.respond_to?(:value) ? bind.value : bind
|
|
378
356
|
|
|
379
|
-
def to_types binds
|
|
380
|
-
binds.enum_for(:each_with_index).to_h do |bind, i|
|
|
381
|
-
type = :INT64
|
|
382
357
|
if bind.respond_to? :type
|
|
383
|
-
|
|
384
|
-
|
|
358
|
+
model_type = bind.type
|
|
359
|
+
types[key] = converter.convert_active_model_type_to_spanner model_type
|
|
360
|
+
params[key] = converter.serialize_with_transaction_isolation_level model_type, bind_value, :dml
|
|
385
361
|
elsif bind.instance_of? Symbol
|
|
386
|
-
|
|
387
|
-
|
|
362
|
+
types[key] = :STRING
|
|
363
|
+
params[key] = converter.serialize_with_transaction_isolation_level :STRING, bind_value, :dml
|
|
388
364
|
elsif bind.instance_of?(TrueClass) || bind.instance_of?(FalseClass)
|
|
389
|
-
|
|
365
|
+
types[key] = :BOOL
|
|
366
|
+
params[key] = bind_value
|
|
367
|
+
else
|
|
368
|
+
types[key] = :INT64
|
|
369
|
+
params[key] = converter.serialize_with_transaction_isolation_level integer_type, bind_value, :dml
|
|
390
370
|
end
|
|
391
|
-
|
|
392
|
-
# Generates binds for named parameters in the format `@p1, @p2, ...`
|
|
393
|
-
"p#{i + 1}", type
|
|
394
|
-
]
|
|
371
|
+
index += 1
|
|
395
372
|
end
|
|
373
|
+
[types, params]
|
|
396
374
|
end
|
|
397
375
|
|
|
398
|
-
def
|
|
399
|
-
binds
|
|
400
|
-
|
|
401
|
-
bind.type
|
|
402
|
-
elsif bind.instance_of? Symbol
|
|
403
|
-
# This ensures that for example :environment is sent as the string 'environment' to Cloud Spanner.
|
|
404
|
-
:STRING
|
|
405
|
-
else
|
|
406
|
-
# The Cloud Spanner default type is INT64 if no other type is known.
|
|
407
|
-
ActiveModel::Type::Integer
|
|
408
|
-
end
|
|
409
|
-
bind_value = bind.respond_to?(:value) ? bind.value : bind
|
|
410
|
-
value = ActiveRecord::Type::Spanner::SpannerActiveRecordConverter
|
|
411
|
-
.serialize_with_transaction_isolation_level(type, bind_value, :dml)
|
|
376
|
+
def to_types binds
|
|
377
|
+
to_types_and_params(binds)[0]
|
|
378
|
+
end
|
|
412
379
|
|
|
413
|
-
|
|
414
|
-
|
|
380
|
+
def to_params binds
|
|
381
|
+
to_types_and_params(binds)[1]
|
|
415
382
|
end
|
|
416
383
|
|
|
417
384
|
# An insert/update/delete statement could use mutations in some specific circumstances.
|