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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/google/cloud/firestore/service.rb +24 -18
- data/lib/google/cloud/firestore/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: b3d5fb19a10f91a2de98cd351b2f4252aba1c95aa8419bf8c266d14a479f7c6c
|
|
4
|
+
data.tar.gz: f3791ce46ad842fa545960b73babdcbc957e58a145064f9405ed1f36ce4be79b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
{
|
|
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
|