google-cloud-firestore 3.2.0 → 3.3.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: 5c27dd8d5dd8cf72e18ab9b2b4cb6456cb0f02406366dcea4c41915fad666d19
4
- data.tar.gz: 2dc72f8146bf82a43b8d37bcefb627f3df2b7a9f1ad8af8387e2db9341b39f26
3
+ metadata.gz: b3d5fb19a10f91a2de98cd351b2f4252aba1c95aa8419bf8c266d14a479f7c6c
4
+ data.tar.gz: f3791ce46ad842fa545960b73babdcbc957e58a145064f9405ed1f36ce4be79b
5
5
  SHA512:
6
- metadata.gz: 24e73e8710ad8d3fbe9fc97008f95daa3a12f7d4fa490edaf02dfe9da139f04aa6dbbb2c713194898d6dc980d8c41db7975038c4d964fdba4b3b17671b5463af
7
- data.tar.gz: 7a4694423f8fd87adb08e85094fab2b0367dbe2a04518f21896cb75a6944fd8cb8635f872986a02d1e7d3173f9aad19eebabffbe3f1f46712728f6cce0350b41
6
+ metadata.gz: 2313b15459fe6afd3117b100b87050e8d64473d38cda727957d1ab8c80856f8a589b6544fcd1270050e84d0c82c8a6940fb0db47750d5e4dd086aa5000ce5721
7
+ data.tar.gz: 37b18639d7f9e9872e67104696a42ac2632a0767839a77bb53281cd1021f4bfafb06b40f5fdbfaff38975e38b479bccee1397911391f3bae0f9dccfb4e260e02
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release History
2
2
 
3
+ ### 3.3.0 (2026-10-29)
4
+
5
+ #### Features
6
+
7
+ * add x-goog-is-transaction routing header ([#36646](https://github.com/googleapis/google-cloud-ruby/issues/36646))
8
+ #### Documentation
9
+
10
+ * link to the published Ruby version support policy ([#36660](https://github.com/googleapis/google-cloud-ruby/issues/36660))
11
+
3
12
  ### 3.2.0 (2026-05-07)
4
13
 
5
14
  #### Features
@@ -73,7 +73,7 @@ module Google
73
73
  if read_time
74
74
  batch_get_req[:read_time] = read_time_to_timestamp(read_time)
75
75
  end
76
- firestore.batch_get_documents batch_get_req, call_options(parent: database_path)
76
+ firestore.batch_get_documents batch_get_req, call_options(parent: database_path, transaction: transaction)
77
77
  end
78
78
 
79
79
  ##
@@ -85,13 +85,16 @@ module Google
85
85
  # method.
86
86
  def list_documents parent, collection_id, token: nil, max: nil, read_time: nil
87
87
  mask = { field_paths: [] }
88
- paged_enum = firestore.list_documents parent: parent,
89
- collection_id: collection_id,
90
- page_size: max,
91
- page_token: token,
92
- mask: mask,
93
- show_missing: true,
94
- read_time: read_time_to_timestamp(read_time)
88
+ list_docs_req = {
89
+ parent: parent,
90
+ collection_id: collection_id,
91
+ page_size: max,
92
+ page_token: token,
93
+ mask: mask,
94
+ show_missing: true,
95
+ read_time: read_time_to_timestamp(read_time)
96
+ }
97
+ paged_enum = firestore.list_documents list_docs_req, call_options(parent: database_path)
95
98
  paged_enum.response
96
99
  end
97
100
 
@@ -118,7 +121,7 @@ module Google
118
121
  page_size: max,
119
122
  read_time: read_time_to_timestamp(read_time)
120
123
  )
121
- paged_enum = firestore.partition_query request
124
+ paged_enum = firestore.partition_query request, call_options(parent: database_path)
122
125
  paged_enum.response
123
126
  end
124
127
 
@@ -142,7 +145,7 @@ module Google
142
145
  run_query_req[:explain_options] = explain_options
143
146
  end
144
147
 
145
- firestore.run_query run_query_req, call_options(parent: database_path)
148
+ firestore.run_query run_query_req, call_options(parent: database_path, transaction: transaction)
146
149
  end
147
150
 
148
151
  ##
@@ -160,7 +163,7 @@ module Google
160
163
  if explain_options
161
164
  request.explain_options = explain_options
162
165
  end
163
- firestore.run_aggregation_query request
166
+ firestore.run_aggregation_query request, call_options(parent: database_path, transaction: transaction)
164
167
  end
165
168
 
166
169
  def listen enum
@@ -173,7 +176,7 @@ module Google
173
176
  database: database_path,
174
177
  options: transaction_opt
175
178
  },
176
- call_options(parent: database_path)
179
+ call_options(parent: database_path, transaction: transaction_opt)
177
180
  )
178
181
  end
179
182
 
@@ -184,7 +187,7 @@ module Google
184
187
  }
185
188
  commit_req[:transaction] = transaction if transaction
186
189
 
187
- firestore.commit commit_req, call_options(parent: database_path)
190
+ firestore.commit commit_req, call_options(parent: database_path, transaction: transaction)
188
191
  end
189
192
 
190
193
  def rollback transaction
@@ -193,7 +196,7 @@ module Google
193
196
  database: database_path,
194
197
  transaction: transaction
195
198
  },
196
- call_options(parent: database_path)
199
+ call_options(parent: database_path, transaction: transaction)
197
200
  )
198
201
  end
199
202
 
@@ -236,15 +239,18 @@ module Google
236
239
 
237
240
  protected
238
241
 
239
- def default_headers parent = nil
242
+ def default_headers parent = nil, transaction: nil
240
243
  parent ||= database_path
241
244
  routing_val = CGI.escapeURIComponent parent
242
- { "x-goog-request-params" => "database=#{routing_val}" }
245
+ {
246
+ "x-goog-request-params" => "database=#{routing_val}",
247
+ "x-goog-is-transaction" => (!transaction.nil?).to_s
248
+ }
243
249
  end
244
250
 
245
- def call_options parent: nil, token: nil
251
+ def call_options parent: nil, token: nil, transaction: nil
246
252
  Gapic::CallOptions.new(**{
247
- metadata: default_headers(parent),
253
+ metadata: default_headers(parent, transaction: transaction),
248
254
  page_token: token
249
255
  }.compact)
250
256
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Firestore
19
- VERSION = "3.2.0".freeze
19
+ VERSION = "3.3.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-firestore
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc