google-cloud-datastore 1.7.1 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d609665c2857145f66bc2c74a6cd06c444ee70c919ddb191a6204c4fdb91b5b
4
- data.tar.gz: '018f3738beaaa8227b901766c27d348a6bdb0333d6eb06aba620104b01923a10'
3
+ metadata.gz: a29b6748c619ac4ab18f6fdeb209b5abdbdab08ec6bd76fd31b751bb79a1d147
4
+ data.tar.gz: 3b77201abcdaead06a37eb19c39fdd2ba8e480eff2b191a05fd76547a8c0a93e
5
5
  SHA512:
6
- metadata.gz: 33c5af902ce9b556881a4788e0c64cb3e47175bb0a3442bd3e15014e6402cbfe7cbd5440fd377d91540a42e7ebe40dc47070a2bdd2fc1ab61bbe4973486c6d44
7
- data.tar.gz: ceb2fbb93d0a65c6325d7eb1964bd06b5a69905a57cddc953d724218400fbc8933fcfa54e12d50ff5b4bebfc1e7dfe948d8016685add15c359a5f6a419d7fafa
6
+ metadata.gz: b9f41907d8ac7577068d992acb6c3cbffcc03a9167ac98c3ff5e1d10da677aebc5f7f3a73a70c3437775ade84eee2b2b519621dba8bce0ededc3ad648feab533
7
+ data.tar.gz: 8f973fce895ea84f1f6547a53a24c57ee3b9893d481ab9fdb6d9751ba43ee31b50f4f1b18204bc01bbd82bc8bdedcfa1831354ecf80a1f11068b125caf06e03e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.7.2 / 2019-12-12
4
+
5
+ #### Bug Fixes
6
+
7
+ * Update some positional params to keyword args in the lower-level API to match the backend service.
8
+
3
9
  ### 1.7.1 / 2019-11-06
4
10
 
5
11
  #### Bug Fixes
@@ -107,12 +107,11 @@ module Google
107
107
  end
108
108
 
109
109
  execute do
110
- service.run_query project,
111
- partition_id,
112
- read_options: read_options,
113
- query: query,
114
- gql_query: gql_query,
115
- options: default_options
110
+ service.run_query project, partition_id: partition_id,
111
+ read_options: read_options,
112
+ query: query,
113
+ gql_query: gql_query,
114
+ options: default_options
116
115
  end
117
116
  end
118
117
 
@@ -144,8 +143,10 @@ module Google
144
143
  def commit mutations, transaction: nil
145
144
  mode = transaction.nil? ? :NON_TRANSACTIONAL : :TRANSACTIONAL
146
145
  execute do
147
- service.commit project, mode, mutations, transaction: transaction,
148
- options: default_options
146
+ service.commit project, mode: mode,
147
+ mutations: mutations,
148
+ transaction: transaction,
149
+ options: default_options
149
150
  end
150
151
  end
151
152
 
@@ -236,9 +236,9 @@ module Google
236
236
  # Looks up entities by key.
237
237
  #
238
238
  # @param project_id [String]
239
- # The ID of the project against which to make the request.
239
+ # Required. The ID of the project against which to make the request.
240
240
  # @param keys [Array<Google::Datastore::V1::Key | Hash>]
241
- # Keys of entities to look up.
241
+ # Required. Keys of entities to look up.
242
242
  # A hash of the same form as `Google::Datastore::V1::Key`
243
243
  # can also be provided.
244
244
  # @param read_options [Google::Datastore::V1::ReadOptions | Hash]
@@ -283,7 +283,7 @@ module Google
283
283
  # Queries for entities.
284
284
  #
285
285
  # @param project_id [String]
286
- # The ID of the project against which to make the request.
286
+ # Required. The ID of the project against which to make the request.
287
287
  # @param partition_id [Google::Datastore::V1::PartitionId | Hash]
288
288
  # Entities are partitioned into subsets, identified by a partition ID.
289
289
  # Queries are scoped to a single partition.
@@ -318,14 +318,11 @@ module Google
318
318
  #
319
319
  # # TODO: Initialize `project_id`:
320
320
  # project_id = ''
321
- #
322
- # # TODO: Initialize `partition_id`:
323
- # partition_id = {}
324
- # response = datastore_client.run_query(project_id, partition_id)
321
+ # response = datastore_client.run_query(project_id)
325
322
 
326
323
  def run_query \
327
324
  project_id,
328
- partition_id,
325
+ partition_id: nil,
329
326
  read_options: nil,
330
327
  query: nil,
331
328
  gql_query: nil,
@@ -345,7 +342,7 @@ module Google
345
342
  # Begins a new transaction.
346
343
  #
347
344
  # @param project_id [String]
348
- # The ID of the project against which to make the request.
345
+ # Required. The ID of the project against which to make the request.
349
346
  # @param transaction_options [Google::Datastore::V1::TransactionOptions | Hash]
350
347
  # Options for a new transaction.
351
348
  # A hash of the same form as `Google::Datastore::V1::TransactionOptions`
@@ -384,9 +381,13 @@ module Google
384
381
  # entities.
385
382
  #
386
383
  # @param project_id [String]
387
- # The ID of the project against which to make the request.
384
+ # Required. The ID of the project against which to make the request.
388
385
  # @param mode [Google::Datastore::V1::CommitRequest::Mode]
389
386
  # The type of commit to perform. Defaults to `TRANSACTIONAL`.
387
+ # @param transaction [String]
388
+ # The identifier of the transaction associated with the commit. A
389
+ # transaction identifier is returned by a call to
390
+ # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
390
391
  # @param mutations [Array<Google::Datastore::V1::Mutation | Hash>]
391
392
  # The mutations to perform.
392
393
  #
@@ -403,10 +404,6 @@ module Google
403
404
  # entity.
404
405
  # A hash of the same form as `Google::Datastore::V1::Mutation`
405
406
  # can also be provided.
406
- # @param transaction [String]
407
- # The identifier of the transaction associated with the commit. A
408
- # transaction identifier is returned by a call to
409
- # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
410
407
  # @param options [Google::Gax::CallOptions]
411
408
  # Overrides the default settings for this call, e.g, timeout,
412
409
  # retries, etc.
@@ -422,26 +419,20 @@ module Google
422
419
  #
423
420
  # # TODO: Initialize `project_id`:
424
421
  # project_id = ''
425
- #
426
- # # TODO: Initialize `mode`:
427
- # mode = :MODE_UNSPECIFIED
428
- #
429
- # # TODO: Initialize `mutations`:
430
- # mutations = []
431
- # response = datastore_client.commit(project_id, mode, mutations)
422
+ # response = datastore_client.commit(project_id)
432
423
 
433
424
  def commit \
434
425
  project_id,
435
- mode,
436
- mutations,
426
+ mode: nil,
437
427
  transaction: nil,
428
+ mutations: nil,
438
429
  options: nil,
439
430
  &block
440
431
  req = {
441
432
  project_id: project_id,
442
433
  mode: mode,
443
- mutations: mutations,
444
- transaction: transaction
434
+ transaction: transaction,
435
+ mutations: mutations
445
436
  }.delete_if { |_, v| v.nil? }
446
437
  req = Google::Gax::to_proto(req, Google::Datastore::V1::CommitRequest)
447
438
  @commit.call(req, options, &block)
@@ -450,9 +441,9 @@ module Google
450
441
  # Rolls back a transaction.
451
442
  #
452
443
  # @param project_id [String]
453
- # The ID of the project against which to make the request.
444
+ # Required. The ID of the project against which to make the request.
454
445
  # @param transaction [String]
455
- # The transaction identifier, returned by a call to
446
+ # Required. The transaction identifier, returned by a call to
456
447
  # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
457
448
  # @param options [Google::Gax::CallOptions]
458
449
  # Overrides the default settings for this call, e.g, timeout,
@@ -491,9 +482,9 @@ module Google
491
482
  # before it is inserted.
492
483
  #
493
484
  # @param project_id [String]
494
- # The ID of the project against which to make the request.
485
+ # Required. The ID of the project against which to make the request.
495
486
  # @param keys [Array<Google::Datastore::V1::Key | Hash>]
496
- # A list of keys with incomplete key paths for which to allocate IDs.
487
+ # Required. A list of keys with incomplete key paths for which to allocate IDs.
497
488
  # No key may be reserved/read-only.
498
489
  # A hash of the same form as `Google::Datastore::V1::Key`
499
490
  # can also be provided.
@@ -534,9 +525,9 @@ module Google
534
525
  # Datastore.
535
526
  #
536
527
  # @param project_id [String]
537
- # The ID of the project against which to make the request.
528
+ # Required. The ID of the project against which to make the request.
538
529
  # @param keys [Array<Google::Datastore::V1::Key | Hash>]
539
- # A list of keys with complete key paths whose numeric IDs should not be
530
+ # Required. A list of keys with complete key paths whose numeric IDs should not be
540
531
  # auto-allocated.
541
532
  # A hash of the same form as `Google::Datastore::V1::Key`
542
533
  # can also be provided.
@@ -13,21 +13,21 @@
13
13
  "initial_retry_delay_millis": 100,
14
14
  "retry_delay_multiplier": 1.3,
15
15
  "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 60000,
16
+ "initial_rpc_timeout_millis": 20000,
17
17
  "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 60000,
18
+ "max_rpc_timeout_millis": 20000,
19
19
  "total_timeout_millis": 600000
20
20
  }
21
21
  },
22
22
  "methods": {
23
23
  "Lookup": {
24
24
  "timeout_millis": 60000,
25
- "retry_codes_name": "idempotent",
25
+ "retry_codes_name": "non_idempotent",
26
26
  "retry_params_name": "default"
27
27
  },
28
28
  "RunQuery": {
29
29
  "timeout_millis": 60000,
30
- "retry_codes_name": "idempotent",
30
+ "retry_codes_name": "non_idempotent",
31
31
  "retry_params_name": "default"
32
32
  },
33
33
  "BeginTransaction": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "ReserveIds": {
54
54
  "timeout_millis": 60000,
55
- "retry_codes_name": "idempotent",
55
+ "retry_codes_name": "non_idempotent",
56
56
  "retry_params_name": "default"
57
57
  }
58
58
  }
@@ -19,13 +19,13 @@ module Google
19
19
  # The request for {Google::Datastore::V1::Datastore::Lookup Datastore::Lookup}.
20
20
  # @!attribute [rw] project_id
21
21
  # @return [String]
22
- # The ID of the project against which to make the request.
22
+ # Required. The ID of the project against which to make the request.
23
23
  # @!attribute [rw] read_options
24
24
  # @return [Google::Datastore::V1::ReadOptions]
25
25
  # The options for this lookup request.
26
26
  # @!attribute [rw] keys
27
27
  # @return [Array<Google::Datastore::V1::Key>]
28
- # Keys of entities to look up.
28
+ # Required. Keys of entities to look up.
29
29
  class LookupRequest; end
30
30
 
31
31
  # The response for {Google::Datastore::V1::Datastore::Lookup Datastore::Lookup}.
@@ -49,7 +49,7 @@ module Google
49
49
  # The request for {Google::Datastore::V1::Datastore::RunQuery Datastore::RunQuery}.
50
50
  # @!attribute [rw] project_id
51
51
  # @return [String]
52
- # The ID of the project against which to make the request.
52
+ # Required. The ID of the project against which to make the request.
53
53
  # @!attribute [rw] partition_id
54
54
  # @return [Google::Datastore::V1::PartitionId]
55
55
  # Entities are partitioned into subsets, identified by a partition ID.
@@ -67,8 +67,7 @@ module Google
67
67
  # The GQL query to run.
68
68
  class RunQueryRequest; end
69
69
 
70
- # The response for
71
- # {Google::Datastore::V1::Datastore::RunQuery Datastore::RunQuery}.
70
+ # The response for {Google::Datastore::V1::Datastore::RunQuery Datastore::RunQuery}.
72
71
  # @!attribute [rw] batch
73
72
  # @return [Google::Datastore::V1::QueryResultBatch]
74
73
  # A batch of query results (always present).
@@ -77,18 +76,16 @@ module Google
77
76
  # The parsed form of the `GqlQuery` from the request, if it was set.
78
77
  class RunQueryResponse; end
79
78
 
80
- # The request for
81
- # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
79
+ # The request for {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
82
80
  # @!attribute [rw] project_id
83
81
  # @return [String]
84
- # The ID of the project against which to make the request.
82
+ # Required. The ID of the project against which to make the request.
85
83
  # @!attribute [rw] transaction_options
86
84
  # @return [Google::Datastore::V1::TransactionOptions]
87
85
  # Options for a new transaction.
88
86
  class BeginTransactionRequest; end
89
87
 
90
- # The response for
91
- # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
88
+ # The response for {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
92
89
  # @!attribute [rw] transaction
93
90
  # @return [String]
94
91
  # The transaction identifier (always present).
@@ -97,22 +94,21 @@ module Google
97
94
  # The request for {Google::Datastore::V1::Datastore::Rollback Datastore::Rollback}.
98
95
  # @!attribute [rw] project_id
99
96
  # @return [String]
100
- # The ID of the project against which to make the request.
97
+ # Required. The ID of the project against which to make the request.
101
98
  # @!attribute [rw] transaction
102
99
  # @return [String]
103
- # The transaction identifier, returned by a call to
100
+ # Required. The transaction identifier, returned by a call to
104
101
  # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}.
105
102
  class RollbackRequest; end
106
103
 
107
- # The response for
108
- # {Google::Datastore::V1::Datastore::Rollback Datastore::Rollback}. (an empty
109
- # message).
104
+ # The response for {Google::Datastore::V1::Datastore::Rollback Datastore::Rollback}.
105
+ # (an empty message).
110
106
  class RollbackResponse; end
111
107
 
112
108
  # The request for {Google::Datastore::V1::Datastore::Commit Datastore::Commit}.
113
109
  # @!attribute [rw] project_id
114
110
  # @return [String]
115
- # The ID of the project against which to make the request.
111
+ # Required. The ID of the project against which to make the request.
116
112
  # @!attribute [rw] mode
117
113
  # @return [Google::Datastore::V1::CommitRequest::Mode]
118
114
  # The type of commit to perform. Defaults to `TRANSACTIONAL`.
@@ -163,41 +159,37 @@ module Google
163
159
  # updated.
164
160
  class CommitResponse; end
165
161
 
166
- # The request for
167
- # {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
162
+ # The request for {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
168
163
  # @!attribute [rw] project_id
169
164
  # @return [String]
170
- # The ID of the project against which to make the request.
165
+ # Required. The ID of the project against which to make the request.
171
166
  # @!attribute [rw] keys
172
167
  # @return [Array<Google::Datastore::V1::Key>]
173
- # A list of keys with incomplete key paths for which to allocate IDs.
168
+ # Required. A list of keys with incomplete key paths for which to allocate IDs.
174
169
  # No key may be reserved/read-only.
175
170
  class AllocateIdsRequest; end
176
171
 
177
- # The response for
178
- # {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
172
+ # The response for {Google::Datastore::V1::Datastore::AllocateIds Datastore::AllocateIds}.
179
173
  # @!attribute [rw] keys
180
174
  # @return [Array<Google::Datastore::V1::Key>]
181
175
  # The keys specified in the request (in the same order), each with
182
176
  # its key path completed with a newly allocated ID.
183
177
  class AllocateIdsResponse; end
184
178
 
185
- # The request for
186
- # {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
179
+ # The request for {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
187
180
  # @!attribute [rw] project_id
188
181
  # @return [String]
189
- # The ID of the project against which to make the request.
182
+ # Required. The ID of the project against which to make the request.
190
183
  # @!attribute [rw] database_id
191
184
  # @return [String]
192
185
  # If not empty, the ID of the database against which to make the request.
193
186
  # @!attribute [rw] keys
194
187
  # @return [Array<Google::Datastore::V1::Key>]
195
- # A list of keys with complete key paths whose numeric IDs should not be
188
+ # Required. A list of keys with complete key paths whose numeric IDs should not be
196
189
  # auto-allocated.
197
190
  class ReserveIdsRequest; end
198
191
 
199
- # The response for
200
- # {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
192
+ # The response for {Google::Datastore::V1::Datastore::ReserveIds Datastore::ReserveIds}.
201
193
  class ReserveIdsResponse; end
202
194
 
203
195
  # A mutation to apply to an entity.
@@ -268,10 +260,8 @@ module Google
268
260
  # Options for beginning a new transaction.
269
261
  #
270
262
  # Transactions can be created explicitly with calls to
271
- # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction}
272
- # or implicitly by setting
273
- # {Google::Datastore::V1::ReadOptions#new_transaction ReadOptions#new_transaction}
274
- # in read requests.
263
+ # {Google::Datastore::V1::Datastore::BeginTransaction Datastore::BeginTransaction} or implicitly by setting
264
+ # {Google::Datastore::V1::ReadOptions#new_transaction ReadOptions#new_transaction} in read requests.
275
265
  # @!attribute [rw] read_write
276
266
  # @return [Google::Datastore::V1::TransactionOptions::ReadWrite]
277
267
  # The transaction should allow both reads and writes.
@@ -100,8 +100,8 @@ module Google
100
100
  # @!attribute [rw] values
101
101
  # @return [Array<Google::Datastore::V1::Value>]
102
102
  # Values in the array.
103
- # The order of this array may not be preserved if it contains a mix of
104
- # indexed and unindexed values.
103
+ # The order of values in an array is preserved as long as all values have
104
+ # identical settings for 'exclude_from_indexes'.
105
105
  class ArrayValue; end
106
106
 
107
107
  # A message that can hold any of the supported value types and associated
@@ -129,8 +129,8 @@ module Google
129
129
  # @!attribute [rw] string_value
130
130
  # @return [String]
131
131
  # A UTF-8 encoded string value.
132
- # When `exclude_from_indexes` is false (it is indexed) , may have at most
133
- # 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.
132
+ # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
133
+ # Otherwise, may be set to at least 1,000,000 bytes.
134
134
  # @!attribute [rw] blob_value
135
135
  # @return [String]
136
136
  # A blob value.
@@ -25,12 +25,12 @@ module Google
25
25
  # The version of the entity, a strictly positive number that monotonically
26
26
  # increases with changes to the entity.
27
27
  #
28
- # This field is set for
29
- # {Google::Datastore::V1::EntityResult::ResultType::FULL `FULL`} entity results.
28
+ # This field is set for {Google::Datastore::V1::EntityResult::ResultType::FULL `FULL`} entity
29
+ # results.
30
30
  #
31
- # For {Google::Datastore::V1::LookupResponse#missing missing} entities in
32
- # `LookupResponse`, this is the version of the snapshot that was used to look
33
- # up the entity, and it is always set except for eventually consistent reads.
31
+ # For {Google::Datastore::V1::LookupResponse#missing missing} entities in `LookupResponse`, this
32
+ # is the version of the snapshot that was used to look up the entity, and it
33
+ # is always set except for eventually consistent reads.
34
34
  # @!attribute [rw] cursor
35
35
  # @return [String]
36
36
  # A cursor that points to the position after the result entity.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Datastore
19
- VERSION = "1.7.1".freeze
19
+ VERSION = "1.7.2".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -5,6 +5,8 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
8
10
  require 'google/datastore/v1/entity_pb'
9
11
  require 'google/datastore/v1/query_pb'
10
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/datastore/v1/datastore.proto for package 'google.datastore.v1'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-07 00:00:00.000000000 Z
12
+ date: 2019-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core