google-cloud-spanner 2.28.0 → 2.29.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/CHANGELOG.md +9 -0
- data/lib/google/cloud/spanner/client.rb +1 -1
- data/lib/google/cloud/spanner/snapshot.rb +31 -2
- data/lib/google/cloud/spanner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c47f3cfa10a6d612de5578cd6602dece290f316246a809a265b504fc74737307
|
|
4
|
+
data.tar.gz: fe95585faa6210cb5110dbc54e3bb95e0a9126577c1893854880ebd8232946a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa836a8f8a9e7da61b9ca53e655a8ab0870dcc50435756af6d2637931b9f16c1f12853a4eab16038176ca4b85395f6d83d7cbccec9a8c37ad5c562f9ee83ad2e
|
|
7
|
+
data.tar.gz: 873894c371f0f7e9679a4df3f4b8fdc28e0047f135584b11616bc25f53982ef42b378cd323c3216d2283f6517071d218dc8a1c7a60fb1b842bac9422fa0b3bda
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 2.29.0 (2025-11-06)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* allow sending request tags for snapshot queries ([#200](https://github.com/googleapis/ruby-spanner/issues/200))
|
|
8
|
+
#### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Don't route to leader for single-use transactions in Client#execute_query ([#201](https://github.com/googleapis/ruby-spanner/issues/201))
|
|
11
|
+
|
|
3
12
|
### 2.28.0 (2025-10-22)
|
|
4
13
|
|
|
5
14
|
#### Features
|
|
@@ -484,7 +484,7 @@ module Google
|
|
|
484
484
|
request_options = Convert.to_request_options request_options,
|
|
485
485
|
tag_type: :request_tag
|
|
486
486
|
single_use_tx = single_use_transaction single_use
|
|
487
|
-
route_to_leader = LARHeaders.execute_query
|
|
487
|
+
route_to_leader = LARHeaders.execute_query false
|
|
488
488
|
results = nil
|
|
489
489
|
@pool.with_session do |session|
|
|
490
490
|
results = session.execute_query \
|
|
@@ -131,6 +131,18 @@ module Google
|
|
|
131
131
|
# available optimizer version.
|
|
132
132
|
# * `:optimizer_statistics_package` (String) Statistics package to
|
|
133
133
|
# use. Empty to use the database default.
|
|
134
|
+
# @param [Hash] request_options Common request options.
|
|
135
|
+
#
|
|
136
|
+
# * `:priority` (Symbol) The relative priority for requests.
|
|
137
|
+
# The priority acts as a hint to the Cloud Spanner scheduler
|
|
138
|
+
# and does not guarantee priority or order of execution.
|
|
139
|
+
# Valid values are `:PRIORITY_LOW`, `:PRIORITY_MEDIUM`,
|
|
140
|
+
# `:PRIORITY_HIGH`. If priority not set then default is
|
|
141
|
+
# `PRIORITY_UNSPECIFIED` is equivalent to `:PRIORITY_HIGH`.
|
|
142
|
+
# * `:tag` (String) A per-request tag which can be applied to
|
|
143
|
+
# queries or reads, used for statistics collection. Tag must be a
|
|
144
|
+
# valid identifier of the form: `[a-zA-Z][a-zA-Z0-9_\-]` between 2
|
|
145
|
+
# and 64 characters in length.
|
|
134
146
|
# @param [Hash] call_options A hash of values to specify the custom
|
|
135
147
|
# call options, e.g., timeout, retries, etc. Call options are
|
|
136
148
|
# optional. The following settings can be provided:
|
|
@@ -304,13 +316,17 @@ module Google
|
|
|
304
316
|
# end
|
|
305
317
|
#
|
|
306
318
|
def execute_query sql, params: nil, types: nil, query_options: nil,
|
|
307
|
-
|
|
319
|
+
request_options: nil, call_options: nil,
|
|
320
|
+
directed_read_options: nil
|
|
308
321
|
ensure_session!
|
|
309
322
|
|
|
310
323
|
params, types = Convert.to_input_params_and_types params, types
|
|
324
|
+
request_options = Convert.to_request_options request_options,
|
|
325
|
+
tag_type: :request_tag
|
|
311
326
|
session.execute_query sql, params: params, types: types,
|
|
312
327
|
transaction: tx_selector,
|
|
313
328
|
query_options: query_options,
|
|
329
|
+
request_options: request_options,
|
|
314
330
|
call_options: call_options,
|
|
315
331
|
directed_read_options: directed_read_options || @directed_read_options
|
|
316
332
|
end
|
|
@@ -334,6 +350,18 @@ module Google
|
|
|
334
350
|
# Optional.
|
|
335
351
|
# @param [Integer] limit If greater than zero, no more than this number
|
|
336
352
|
# of rows will be returned. The default is no limit.
|
|
353
|
+
# @param [Hash] request_options Common request options.
|
|
354
|
+
#
|
|
355
|
+
# * `:priority` (Symbol) The relative priority for requests.
|
|
356
|
+
# The priority acts as a hint to the Cloud Spanner scheduler
|
|
357
|
+
# and does not guarantee priority or order of execution.
|
|
358
|
+
# Valid values are `:PRIORITY_LOW`, `:PRIORITY_MEDIUM`,
|
|
359
|
+
# `:PRIORITY_HIGH`. If priority not set then default is
|
|
360
|
+
# `PRIORITY_UNSPECIFIED` is equivalent to `:PRIORITY_HIGH`.
|
|
361
|
+
# * `:tag` (String) A per-request tag which can be applied to
|
|
362
|
+
# queries or reads, used for statistics collection. Tag must be a
|
|
363
|
+
# valid identifier of the form: `[a-zA-Z][a-zA-Z0-9_\-]` between 2
|
|
364
|
+
# and 64 characters in length.
|
|
337
365
|
# @param [Hash] call_options A hash of values to specify the custom
|
|
338
366
|
# call options, e.g., timeout, retries, etc. Call options are
|
|
339
367
|
# optional. The following settings can be provided:
|
|
@@ -380,7 +408,7 @@ module Google
|
|
|
380
408
|
# end
|
|
381
409
|
#
|
|
382
410
|
def read table, columns, keys: nil, index: nil, limit: nil,
|
|
383
|
-
call_options: nil, directed_read_options: nil
|
|
411
|
+
request_options: nil, call_options: nil, directed_read_options: nil
|
|
384
412
|
ensure_session!
|
|
385
413
|
|
|
386
414
|
columns = Array(columns).map(&:to_s)
|
|
@@ -388,6 +416,7 @@ module Google
|
|
|
388
416
|
|
|
389
417
|
session.read table, columns, keys: keys, index: index, limit: limit,
|
|
390
418
|
transaction: tx_selector,
|
|
419
|
+
request_options: request_options,
|
|
391
420
|
call_options: call_options,
|
|
392
421
|
directed_read_options: directed_read_options || @directed_read_options
|
|
393
422
|
end
|