google-cloud-firestore 0.25.0 → 0.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +33 -12
  3. data/CHANGELOG.md +8 -1
  4. data/lib/google/cloud/firestore/client.rb +4 -4
  5. data/lib/google/cloud/firestore/collection_reference.rb +1 -1
  6. data/lib/google/cloud/firestore/document_reference.rb +3 -3
  7. data/lib/google/cloud/firestore/field_path.rb +5 -4
  8. data/lib/google/cloud/firestore/generate.rb +1 -1
  9. data/lib/google/cloud/firestore/query.rb +6 -6
  10. data/lib/google/cloud/firestore/transaction.rb +5 -5
  11. data/lib/google/cloud/firestore/v1.rb +1 -1
  12. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +5 -5
  13. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +1 -1
  14. data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +2 -1
  15. data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +15 -13
  16. data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +17 -14
  17. data/lib/google/cloud/firestore/v1/firestore_client.rb +60 -33
  18. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +9 -9
  19. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +1 -1
  20. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +2 -1
  21. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +15 -13
  22. data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +17 -14
  23. data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +60 -33
  24. data/lib/google/cloud/firestore/version.rb +1 -1
  25. data/lib/google/cloud/firestore/watch/enumerator_queue.rb +1 -1
  26. data/lib/google/cloud/firestore/watch/order.rb +2 -2
  27. data/lib/google/firestore/v1/common_pb.rb +1 -1
  28. data/lib/google/firestore/v1/document_pb.rb +1 -1
  29. data/lib/google/firestore/v1/firestore_services_pb.rb +1 -1
  30. data/lib/google/firestore/v1/query_pb.rb +5 -5
  31. data/lib/google/firestore/v1/write_pb.rb +1 -1
  32. data/lib/google/firestore/v1beta1/common_pb.rb +1 -1
  33. data/lib/google/firestore/v1beta1/document_pb.rb +1 -1
  34. data/lib/google/firestore/v1beta1/firestore_services_pb.rb +1 -1
  35. data/lib/google/firestore/v1beta1/query_pb.rb +5 -5
  36. data/lib/google/firestore/v1beta1/write_pb.rb +1 -1
  37. metadata +5 -6
@@ -87,17 +87,17 @@ module Google
87
87
  ].freeze
88
88
 
89
89
 
90
- DATABASE_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
91
- "projects/{project}/databases/{database}"
90
+ ANY_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
91
+ "projects/{project}/databases/{database}/documents/{document}/{any_path=**}"
92
92
  )
93
93
 
94
- private_constant :DATABASE_ROOT_PATH_TEMPLATE
94
+ private_constant :ANY_PATH_PATH_TEMPLATE
95
95
 
96
- DOCUMENT_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
97
- "projects/{project}/databases/{database}/documents"
96
+ DATABASE_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
97
+ "projects/{project}/databases/{database}"
98
98
  )
99
99
 
100
- private_constant :DOCUMENT_ROOT_PATH_TEMPLATE
100
+ private_constant :DATABASE_ROOT_PATH_TEMPLATE
101
101
 
102
102
  DOCUMENT_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
103
103
  "projects/{project}/databases/{database}/documents/{document_path=**}"
@@ -105,29 +105,33 @@ module Google
105
105
 
106
106
  private_constant :DOCUMENT_PATH_PATH_TEMPLATE
107
107
 
108
- ANY_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
109
- "projects/{project}/databases/{database}/documents/{document}/{any_path=**}"
108
+ DOCUMENT_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
109
+ "projects/{project}/databases/{database}/documents"
110
110
  )
111
111
 
112
- private_constant :ANY_PATH_PATH_TEMPLATE
112
+ private_constant :DOCUMENT_ROOT_PATH_TEMPLATE
113
113
 
114
- # Returns a fully-qualified database_root resource name string.
114
+ # Returns a fully-qualified any_path resource name string.
115
115
  # @param project [String]
116
116
  # @param database [String]
117
+ # @param document [String]
118
+ # @param any_path [String]
117
119
  # @return [String]
118
- def self.database_root_path project, database
119
- DATABASE_ROOT_PATH_TEMPLATE.render(
120
+ def self.any_path_path project, database, document, any_path
121
+ ANY_PATH_PATH_TEMPLATE.render(
120
122
  :"project" => project,
121
- :"database" => database
123
+ :"database" => database,
124
+ :"document" => document,
125
+ :"any_path" => any_path
122
126
  )
123
127
  end
124
128
 
125
- # Returns a fully-qualified document_root resource name string.
129
+ # Returns a fully-qualified database_root resource name string.
126
130
  # @param project [String]
127
131
  # @param database [String]
128
132
  # @return [String]
129
- def self.document_root_path project, database
130
- DOCUMENT_ROOT_PATH_TEMPLATE.render(
133
+ def self.database_root_path project, database
134
+ DATABASE_ROOT_PATH_TEMPLATE.render(
131
135
  :"project" => project,
132
136
  :"database" => database
133
137
  )
@@ -146,18 +150,14 @@ module Google
146
150
  )
147
151
  end
148
152
 
149
- # Returns a fully-qualified any_path resource name string.
153
+ # Returns a fully-qualified document_root resource name string.
150
154
  # @param project [String]
151
155
  # @param database [String]
152
- # @param document [String]
153
- # @param any_path [String]
154
156
  # @return [String]
155
- def self.any_path_path project, database, document, any_path
156
- ANY_PATH_PATH_TEMPLATE.render(
157
+ def self.document_root_path project, database
158
+ DOCUMENT_ROOT_PATH_TEMPLATE.render(
157
159
  :"project" => project,
158
- :"database" => database,
159
- :"document" => document,
160
- :"any_path" => any_path
160
+ :"database" => database
161
161
  )
162
162
  end
163
163
 
@@ -267,7 +267,10 @@ module Google
267
267
  @get_document = Google::Gax.create_api_call(
268
268
  @firestore_stub.method(:get_document),
269
269
  defaults["get_document"],
270
- exception_transformer: exception_transformer
270
+ exception_transformer: exception_transformer,
271
+ params_extractor: proc do |request|
272
+ {'name' => request.name}
273
+ end
271
274
  )
272
275
  @list_documents = Google::Gax.create_api_call(
273
276
  @firestore_stub.method(:list_documents),
@@ -282,37 +285,58 @@ module Google
282
285
  @update_document = Google::Gax.create_api_call(
283
286
  @firestore_stub.method(:update_document),
284
287
  defaults["update_document"],
285
- exception_transformer: exception_transformer
288
+ exception_transformer: exception_transformer,
289
+ params_extractor: proc do |request|
290
+ {'document.name' => request.document.name}
291
+ end
286
292
  )
287
293
  @delete_document = Google::Gax.create_api_call(
288
294
  @firestore_stub.method(:delete_document),
289
295
  defaults["delete_document"],
290
- exception_transformer: exception_transformer
296
+ exception_transformer: exception_transformer,
297
+ params_extractor: proc do |request|
298
+ {'name' => request.name}
299
+ end
291
300
  )
292
301
  @batch_get_documents = Google::Gax.create_api_call(
293
302
  @firestore_stub.method(:batch_get_documents),
294
303
  defaults["batch_get_documents"],
295
- exception_transformer: exception_transformer
304
+ exception_transformer: exception_transformer,
305
+ params_extractor: proc do |request|
306
+ {'database' => request.database}
307
+ end
296
308
  )
297
309
  @begin_transaction = Google::Gax.create_api_call(
298
310
  @firestore_stub.method(:begin_transaction),
299
311
  defaults["begin_transaction"],
300
- exception_transformer: exception_transformer
312
+ exception_transformer: exception_transformer,
313
+ params_extractor: proc do |request|
314
+ {'database' => request.database}
315
+ end
301
316
  )
302
317
  @commit = Google::Gax.create_api_call(
303
318
  @firestore_stub.method(:commit),
304
319
  defaults["commit"],
305
- exception_transformer: exception_transformer
320
+ exception_transformer: exception_transformer,
321
+ params_extractor: proc do |request|
322
+ {'database' => request.database}
323
+ end
306
324
  )
307
325
  @rollback = Google::Gax.create_api_call(
308
326
  @firestore_stub.method(:rollback),
309
327
  defaults["rollback"],
310
- exception_transformer: exception_transformer
328
+ exception_transformer: exception_transformer,
329
+ params_extractor: proc do |request|
330
+ {'database' => request.database}
331
+ end
311
332
  )
312
333
  @run_query = Google::Gax.create_api_call(
313
334
  @firestore_stub.method(:run_query),
314
335
  defaults["run_query"],
315
- exception_transformer: exception_transformer
336
+ exception_transformer: exception_transformer,
337
+ params_extractor: proc do |request|
338
+ {'parent' => request.parent}
339
+ end
316
340
  )
317
341
  @write = Google::Gax.create_api_call(
318
342
  @firestore_stub.method(:write),
@@ -327,7 +351,10 @@ module Google
327
351
  @list_collection_ids = Google::Gax.create_api_call(
328
352
  @firestore_stub.method(:list_collection_ids),
329
353
  defaults["list_collection_ids"],
330
- exception_transformer: exception_transformer
354
+ exception_transformer: exception_transformer,
355
+ params_extractor: proc do |request|
356
+ {'parent' => request.parent}
357
+ end
331
358
  )
332
359
  end
333
360
 
@@ -145,6 +145,15 @@ module Google
145
145
  end
146
146
  end
147
147
 
148
+ # The projection of document's fields to return.
149
+ # @!attribute [rw] fields
150
+ # @return [Array<Google::Firestore::V1beta1::StructuredQuery::FieldReference>]
151
+ # The fields to return.
152
+ #
153
+ # If empty, all fields are returned. To only return the name
154
+ # of the document, use `['__name__']`.
155
+ class Projection; end
156
+
148
157
  # A filter with a single operand.
149
158
  # @!attribute [rw] op
150
159
  # @return [Google::Firestore::V1beta1::StructuredQuery::UnaryFilter::Operator]
@@ -180,15 +189,6 @@ module Google
180
189
  # @return [String]
181
190
  class FieldReference; end
182
191
 
183
- # The projection of document's fields to return.
184
- # @!attribute [rw] fields
185
- # @return [Array<Google::Firestore::V1beta1::StructuredQuery::FieldReference>]
186
- # The fields to return.
187
- #
188
- # If empty, all fields are returned. To only return the name
189
- # of the document, use `['__name__']`.
190
- class Projection; end
191
-
192
192
  # A sort direction.
193
193
  module Direction
194
194
  # Unspecified.
@@ -26,7 +26,7 @@ module Google
26
26
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
27
27
  # @!attribute [rw] transform
28
28
  # @return [Google::Firestore::V1beta1::DocumentTransform]
29
- # Applies a tranformation to a document.
29
+ # Applies a transformation to a document.
30
30
  # At most one `transform` per document is allowed in a given request.
31
31
  # An `update` cannot follow a `transform` on the same document in a given
32
32
  # request.
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -15,17 +15,19 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone
19
- # or calendar, represented as seconds and fractions of seconds at
20
- # nanosecond resolution in UTC Epoch time. It is encoded using the
21
- # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
- # backwards to year one. It is encoded assuming all minutes are 60
23
- # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
- # table is needed for interpretation. Range is from
25
- # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
- # By restricting to that range, we ensure that we can convert to
27
- # and from RFC 3339 date strings.
28
- # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
18
+ # A Timestamp represents a point in time independent of any time zone or local
19
+ # calendar, encoded as a count of seconds and fractions of seconds at
20
+ # nanosecond resolution. The count is relative to an epoch at UTC midnight on
21
+ # January 1, 1970, in the proleptic Gregorian calendar which extends the
22
+ # Gregorian calendar backwards to year one.
23
+ #
24
+ # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
25
+ # second table is needed for interpretation, using a [24-hour linear
26
+ # smear](https://developers.google.com/time/smear).
27
+ #
28
+ # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
29
+ # restricting to that range, we ensure that we can convert to and from [RFC
30
+ # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
29
31
  #
30
32
  # = Examples
31
33
  #
@@ -86,12 +88,12 @@ module Google
86
88
  # 01:30 UTC on January 15, 2017.
87
89
  #
88
90
  # In JavaScript, one can convert a Date object to this format using the
89
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
91
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
90
92
  # method. In Python, a standard `datetime.datetime` object can be converted
91
93
  # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
92
94
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
95
  # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
96
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
97
  # ) to obtain a formatter capable of generating timestamps in this format.
96
98
  # @!attribute [rw] seconds
97
99
  # @return [Integer]
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
@@ -87,17 +87,17 @@ module Google
87
87
  ].freeze
88
88
 
89
89
 
90
- DATABASE_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
91
- "projects/{project}/databases/{database}"
90
+ ANY_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
91
+ "projects/{project}/databases/{database}/documents/{document}/{any_path=**}"
92
92
  )
93
93
 
94
- private_constant :DATABASE_ROOT_PATH_TEMPLATE
94
+ private_constant :ANY_PATH_PATH_TEMPLATE
95
95
 
96
- DOCUMENT_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
97
- "projects/{project}/databases/{database}/documents"
96
+ DATABASE_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
97
+ "projects/{project}/databases/{database}"
98
98
  )
99
99
 
100
- private_constant :DOCUMENT_ROOT_PATH_TEMPLATE
100
+ private_constant :DATABASE_ROOT_PATH_TEMPLATE
101
101
 
102
102
  DOCUMENT_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
103
103
  "projects/{project}/databases/{database}/documents/{document_path=**}"
@@ -105,29 +105,33 @@ module Google
105
105
 
106
106
  private_constant :DOCUMENT_PATH_PATH_TEMPLATE
107
107
 
108
- ANY_PATH_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
109
- "projects/{project}/databases/{database}/documents/{document}/{any_path=**}"
108
+ DOCUMENT_ROOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
109
+ "projects/{project}/databases/{database}/documents"
110
110
  )
111
111
 
112
- private_constant :ANY_PATH_PATH_TEMPLATE
112
+ private_constant :DOCUMENT_ROOT_PATH_TEMPLATE
113
113
 
114
- # Returns a fully-qualified database_root resource name string.
114
+ # Returns a fully-qualified any_path resource name string.
115
115
  # @param project [String]
116
116
  # @param database [String]
117
+ # @param document [String]
118
+ # @param any_path [String]
117
119
  # @return [String]
118
- def self.database_root_path project, database
119
- DATABASE_ROOT_PATH_TEMPLATE.render(
120
+ def self.any_path_path project, database, document, any_path
121
+ ANY_PATH_PATH_TEMPLATE.render(
120
122
  :"project" => project,
121
- :"database" => database
123
+ :"database" => database,
124
+ :"document" => document,
125
+ :"any_path" => any_path
122
126
  )
123
127
  end
124
128
 
125
- # Returns a fully-qualified document_root resource name string.
129
+ # Returns a fully-qualified database_root resource name string.
126
130
  # @param project [String]
127
131
  # @param database [String]
128
132
  # @return [String]
129
- def self.document_root_path project, database
130
- DOCUMENT_ROOT_PATH_TEMPLATE.render(
133
+ def self.database_root_path project, database
134
+ DATABASE_ROOT_PATH_TEMPLATE.render(
131
135
  :"project" => project,
132
136
  :"database" => database
133
137
  )
@@ -146,18 +150,14 @@ module Google
146
150
  )
147
151
  end
148
152
 
149
- # Returns a fully-qualified any_path resource name string.
153
+ # Returns a fully-qualified document_root resource name string.
150
154
  # @param project [String]
151
155
  # @param database [String]
152
- # @param document [String]
153
- # @param any_path [String]
154
156
  # @return [String]
155
- def self.any_path_path project, database, document, any_path
156
- ANY_PATH_PATH_TEMPLATE.render(
157
+ def self.document_root_path project, database
158
+ DOCUMENT_ROOT_PATH_TEMPLATE.render(
157
159
  :"project" => project,
158
- :"database" => database,
159
- :"document" => document,
160
- :"any_path" => any_path
160
+ :"database" => database
161
161
  )
162
162
  end
163
163
 
@@ -267,7 +267,10 @@ module Google
267
267
  @get_document = Google::Gax.create_api_call(
268
268
  @firestore_stub.method(:get_document),
269
269
  defaults["get_document"],
270
- exception_transformer: exception_transformer
270
+ exception_transformer: exception_transformer,
271
+ params_extractor: proc do |request|
272
+ {'name' => request.name}
273
+ end
271
274
  )
272
275
  @list_documents = Google::Gax.create_api_call(
273
276
  @firestore_stub.method(:list_documents),
@@ -282,37 +285,58 @@ module Google
282
285
  @update_document = Google::Gax.create_api_call(
283
286
  @firestore_stub.method(:update_document),
284
287
  defaults["update_document"],
285
- exception_transformer: exception_transformer
288
+ exception_transformer: exception_transformer,
289
+ params_extractor: proc do |request|
290
+ {'document.name' => request.document.name}
291
+ end
286
292
  )
287
293
  @delete_document = Google::Gax.create_api_call(
288
294
  @firestore_stub.method(:delete_document),
289
295
  defaults["delete_document"],
290
- exception_transformer: exception_transformer
296
+ exception_transformer: exception_transformer,
297
+ params_extractor: proc do |request|
298
+ {'name' => request.name}
299
+ end
291
300
  )
292
301
  @batch_get_documents = Google::Gax.create_api_call(
293
302
  @firestore_stub.method(:batch_get_documents),
294
303
  defaults["batch_get_documents"],
295
- exception_transformer: exception_transformer
304
+ exception_transformer: exception_transformer,
305
+ params_extractor: proc do |request|
306
+ {'database' => request.database}
307
+ end
296
308
  )
297
309
  @begin_transaction = Google::Gax.create_api_call(
298
310
  @firestore_stub.method(:begin_transaction),
299
311
  defaults["begin_transaction"],
300
- exception_transformer: exception_transformer
312
+ exception_transformer: exception_transformer,
313
+ params_extractor: proc do |request|
314
+ {'database' => request.database}
315
+ end
301
316
  )
302
317
  @commit = Google::Gax.create_api_call(
303
318
  @firestore_stub.method(:commit),
304
319
  defaults["commit"],
305
- exception_transformer: exception_transformer
320
+ exception_transformer: exception_transformer,
321
+ params_extractor: proc do |request|
322
+ {'database' => request.database}
323
+ end
306
324
  )
307
325
  @rollback = Google::Gax.create_api_call(
308
326
  @firestore_stub.method(:rollback),
309
327
  defaults["rollback"],
310
- exception_transformer: exception_transformer
328
+ exception_transformer: exception_transformer,
329
+ params_extractor: proc do |request|
330
+ {'database' => request.database}
331
+ end
311
332
  )
312
333
  @run_query = Google::Gax.create_api_call(
313
334
  @firestore_stub.method(:run_query),
314
335
  defaults["run_query"],
315
- exception_transformer: exception_transformer
336
+ exception_transformer: exception_transformer,
337
+ params_extractor: proc do |request|
338
+ {'parent' => request.parent}
339
+ end
316
340
  )
317
341
  @write = Google::Gax.create_api_call(
318
342
  @firestore_stub.method(:write),
@@ -327,7 +351,10 @@ module Google
327
351
  @list_collection_ids = Google::Gax.create_api_call(
328
352
  @firestore_stub.method(:list_collection_ids),
329
353
  defaults["list_collection_ids"],
330
- exception_transformer: exception_transformer
354
+ exception_transformer: exception_transformer,
355
+ params_extractor: proc do |request|
356
+ {'parent' => request.parent}
357
+ end
331
358
  )
332
359
  end
333
360