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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 850ac8a54d873ff6d92cc7d7b835abd1d0fd980d22529296b036b67d5c4ecbfe
4
- data.tar.gz: 585441baf49b27942fddc9876044221965fe9edd475bdf8f6c53f463a3a75cf0
3
+ metadata.gz: c47f3cfa10a6d612de5578cd6602dece290f316246a809a265b504fc74737307
4
+ data.tar.gz: fe95585faa6210cb5110dbc54e3bb95e0a9126577c1893854880ebd8232946a1
5
5
  SHA512:
6
- metadata.gz: dca36d5f2479c792b0c7e10051cf52915314c76de12581d09ff8284ae8e591430d2d67f779c71b2956580e4f970054ddcac3d3f8429ed8ced759b8cd0be0339a
7
- data.tar.gz: 887212c39b640de69edf12df3bca506494a7bb65c6f0b102eb80cefb3c41e8c3511b027f18334669ab58a9d1ba7114ab1d5bdc83d4982c39521ff4d542b94344
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 true
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
- call_options: nil, directed_read_options: nil
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
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Spanner
19
- VERSION = "2.28.0".freeze
19
+ VERSION = "2.29.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.28.0
4
+ version: 2.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore