google-cloud-spanner 1.9.5 → 1.10.0

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: 4bd43e4ff4afe7c4fd3921fa836bef71e780a9547dda7aeafdcc4f4fdaa23596
4
- data.tar.gz: b9f4c2644dbf728557ee50391f1df343afe551c8ccb6e4d252d6a21169c3f7eb
3
+ metadata.gz: dde38d5d82e73364774672eff6ab0794805e1994e4785ca8d116dddbd0b3b42e
4
+ data.tar.gz: 7a9df6a832ff09c3114df44663da677b0a79a8c3ffcb9f699c290055f354690d
5
5
  SHA512:
6
- metadata.gz: c6ac19de3536e631aa031c6e12376a03affe89091f45f4670476d74e00e8808deea65a5f9e73dafeaaeb9e21f1d8255b1b117ddbf54c2ab55d70960435e3be12
7
- data.tar.gz: 802f7c60629c2f96df7d19be54db6f4e66b1647aa40c3950dae190c7e5c294a6b7ef2b7ceddb096724faec9ee5df26e7f3430ee450ea1fb6a53b920d70f84b83
6
+ metadata.gz: 9e332afb76f15f0fd3e93fdc60ebc5d31fb588b9750d248a9dd8d75d39f7f49f1bf1b69c1242a180bd938b32e302d9006fc0d7df8646c60d6c3d00b33e3dc1f3
7
+ data.tar.gz: 6fee5b7b6d76bf63860eb3f8ceb374ab2ca87decb6afaffef8bdefeb8a952e6ad3110429ae99d9fbf1cef7f7c7d5954b2c83fede80f0f18763a4e4a6a1378942
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Release History
2
2
 
3
+ ### 1.10.0 / 2019-08-23
4
+
5
+ #### Features
6
+
7
+ * Add Batch Create Sessions to low-level API
8
+ * Add SpannerClient#batch_create_sessions
9
+ * Add BatchCreateSessionsRequest
10
+ * Add BatchCreateSessionsResponse
11
+ * Support overriding of service endpoint
12
+
13
+ #### Bug Fixes
14
+
15
+ * Low-level admin clients now honor service_address and service_port
16
+
17
+ #### Documentation
18
+
19
+ * Update documentation
20
+
3
21
  ### 1.9.5 / 2019-07-31
4
22
 
5
23
  * Reduce thread usage at startup
data/OVERVIEW.md CHANGED
@@ -21,7 +21,7 @@ When you first use Cloud Spanner, you must create an instance, which is an
21
21
  allocation of resources that are used by Cloud Spanner databases. When you
22
22
  create an instance, you choose where your data is stored and how many nodes are
23
23
  used for your data. (For more information, see [Configuration
24
- Guide](https://googleapis.dev/ruby/stackdriver/INSTRUMENTATION_CONFIGURATION)/latest).
24
+ Guide](https://googleapis.dev/ruby/stackdriver/latest/file.INSTRUMENTATION_CONFIGURATION.html).
25
25
 
26
26
  Use {Google::Cloud::Spanner::Project#create_instance Project#create_instance} to
27
27
  create an instance:
@@ -132,4 +132,5 @@ Google::Cloud.configure.add_config! :spanner do |config|
132
132
  config.add_field! :scope, nil, match: [String, Array]
133
133
  config.add_field! :timeout, nil, match: Integer
134
134
  config.add_field! :client_config, nil, match: Hash
135
+ config.add_field! :endpoint, nil, match: String
135
136
  end
@@ -59,6 +59,8 @@ module Google
59
59
  # @param [Integer] timeout Default timeout to use in requests. Optional.
60
60
  # @param [Hash] client_config A hash of values to override the default
61
61
  # behavior of the API client. Optional.
62
+ # @param [String] endpoint Override of the endpoint host name. Optional.
63
+ # If the param is nil, uses the default endpoint.
62
64
  # @param [String] project Alias for the `project_id` argument. Deprecated.
63
65
  # @param [String] keyfile Alias for the `credentials` argument.
64
66
  # Deprecated.
@@ -71,11 +73,12 @@ module Google
71
73
  # spanner = Google::Cloud::Spanner.new
72
74
  #
73
75
  def self.new project_id: nil, credentials: nil, scope: nil, timeout: nil,
74
- client_config: nil, project: nil, keyfile: nil
76
+ client_config: nil, endpoint: nil, project: nil, keyfile: nil
75
77
  project_id ||= (project || default_project_id)
76
78
  scope ||= configure.scope
77
79
  timeout ||= configure.timeout
78
80
  client_config ||= configure.client_config
81
+ endpoint ||= configure.endpoint
79
82
  credentials ||= (keyfile || default_credentials(scope: scope))
80
83
 
81
84
  unless credentials.is_a? Google::Auth::Credentials
@@ -90,8 +93,8 @@ module Google
90
93
 
91
94
  Spanner::Project.new(
92
95
  Spanner::Service.new(
93
- project_id, credentials, timeout: timeout,
94
- client_config: client_config
96
+ project_id, credentials,
97
+ host: endpoint, timeout: timeout, client_config: client_config
95
98
  )
96
99
  )
97
100
  end
@@ -112,6 +115,8 @@ module Google
112
115
  # * `timeout` - (Integer) Default timeout to use in requests.
113
116
  # * `client_config` - (Hash) A hash of values to override the default
114
117
  # behavior of the API client.
118
+ # * `endpoint` - (String) Override of the endpoint host name, or `nil`
119
+ # to use the default endpoint.
115
120
  #
116
121
  # @return [Google::Cloud::Config] The configuration object the
117
122
  # Google::Cloud::Spanner library uses.
@@ -144,6 +144,10 @@ module Google
144
144
  # The default timeout, in seconds, for calls made through this client.
145
145
  # @param metadata [Hash]
146
146
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
147
+ # @param service_address [String]
148
+ # Override for the service hostname, or `nil` to leave as the default.
149
+ # @param service_port [Integer]
150
+ # Override for the service port, or `nil` to leave as the default.
147
151
  # @param exception_transformer [Proc]
148
152
  # An optional proc that intercepts any exceptions raised during an API call to inject
149
153
  # custom error handling.
@@ -153,6 +157,8 @@ module Google
153
157
  client_config: {},
154
158
  timeout: DEFAULT_TIMEOUT,
155
159
  metadata: nil,
160
+ service_address: nil,
161
+ service_port: nil,
156
162
  exception_transformer: nil,
157
163
  lib_name: nil,
158
164
  lib_version: ""
@@ -217,8 +223,8 @@ module Google
217
223
  end
218
224
 
219
225
  # Allow overriding the service path/port in subclasses.
220
- service_path = self.class::SERVICE_ADDRESS
221
- port = self.class::DEFAULT_SERVICE_PORT
226
+ service_path = service_address || self.class::SERVICE_ADDRESS
227
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
222
228
  interceptors = self.class::GRPC_INTERCEPTORS
223
229
  @database_admin_stub = Google::Gax::Grpc.create_stub(
224
230
  service_path,
@@ -79,7 +79,7 @@ module Google
79
79
  # ensure that their change will be applied to the same version of the policy.
80
80
  #
81
81
  # If no `etag` is provided in the call to `setIamPolicy`, then the existing
82
- # policy is overwritten blindly.
82
+ # policy is overwritten.
83
83
  class Policy; end
84
84
 
85
85
  # Associates `members` with a `role`.
@@ -99,7 +99,7 @@ module Google
99
99
  # who is authenticated with a Google account or a service account.
100
100
  #
101
101
  # * `user:{emailid}`: An email address that represents a specific Google
102
- # account. For example, `alice@gmail.com` .
102
+ # account. For example, `alice@example.com` .
103
103
  #
104
104
  #
105
105
  # * `serviceAccount:{emailid}`: An email address that represents a service
@@ -79,7 +79,7 @@ module Google
79
79
  # ensure that their change will be applied to the same version of the policy.
80
80
  #
81
81
  # If no `etag` is provided in the call to `setIamPolicy`, then the existing
82
- # policy is overwritten blindly.
82
+ # policy is overwritten.
83
83
  class Policy; end
84
84
 
85
85
  # Associates `members` with a `role`.
@@ -99,7 +99,7 @@ module Google
99
99
  # who is authenticated with a Google account or a service account.
100
100
  #
101
101
  # * `user:{emailid}`: An email address that represents a specific Google
102
- # account. For example, `alice@gmail.com` .
102
+ # account. For example, `alice@example.com` .
103
103
  #
104
104
  #
105
105
  # * `serviceAccount:{emailid}`: An email address that represents a service
@@ -177,6 +177,10 @@ module Google
177
177
  # The default timeout, in seconds, for calls made through this client.
178
178
  # @param metadata [Hash]
179
179
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
180
+ # @param service_address [String]
181
+ # Override for the service hostname, or `nil` to leave as the default.
182
+ # @param service_port [Integer]
183
+ # Override for the service port, or `nil` to leave as the default.
180
184
  # @param exception_transformer [Proc]
181
185
  # An optional proc that intercepts any exceptions raised during an API call to inject
182
186
  # custom error handling.
@@ -186,6 +190,8 @@ module Google
186
190
  client_config: {},
187
191
  timeout: DEFAULT_TIMEOUT,
188
192
  metadata: nil,
193
+ service_address: nil,
194
+ service_port: nil,
189
195
  exception_transformer: nil,
190
196
  lib_name: nil,
191
197
  lib_version: ""
@@ -250,8 +256,8 @@ module Google
250
256
  end
251
257
 
252
258
  # Allow overriding the service path/port in subclasses.
253
- service_path = self.class::SERVICE_ADDRESS
254
- port = self.class::DEFAULT_SERVICE_PORT
259
+ service_path = service_address || self.class::SERVICE_ADDRESS
260
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
255
261
  interceptors = self.class::GRPC_INTERCEPTORS
256
262
  @instance_admin_stub = Google::Gax::Grpc.create_stub(
257
263
  service_path,
@@ -20,6 +20,7 @@ require "google/cloud/spanner/v1"
20
20
  require "google/cloud/spanner/admin/instance/v1"
21
21
  require "google/cloud/spanner/admin/database/v1"
22
22
  require "google/cloud/spanner/convert"
23
+ require "uri"
23
24
 
24
25
  module Google
25
26
  module Cloud
@@ -28,13 +29,15 @@ module Google
28
29
  # @private Represents the gRPC Spanner service, including all the API
29
30
  # methods.
30
31
  class Service
31
- attr_accessor :project, :credentials, :timeout, :client_config
32
+ attr_accessor :project, :credentials, :timeout, :client_config, :host
32
33
 
33
34
  ##
34
35
  # Creates a new Service instance.
35
- def initialize project, credentials, timeout: nil, client_config: nil
36
+ def initialize project, credentials, host: nil, timeout: nil,
37
+ client_config: nil
36
38
  @project = project
37
39
  @credentials = credentials
40
+ @host = host || V1::SpannerClient::SERVICE_ADDRESS
38
41
  @timeout = timeout
39
42
  @client_config = client_config || {}
40
43
  end
@@ -46,6 +49,8 @@ module Google
46
49
  credentials: credentials,
47
50
  timeout: timeout,
48
51
  client_config: client_config,
52
+ service_address: service_address,
53
+ service_port: service_port,
49
54
  lib_name: "gccl",
50
55
  lib_version: Google::Cloud::Spanner::VERSION
51
56
  )
@@ -59,6 +64,8 @@ module Google
59
64
  credentials: credentials,
60
65
  timeout: timeout,
61
66
  client_config: client_config,
67
+ service_address: service_address,
68
+ service_port: service_port,
62
69
  lib_name: "gccl",
63
70
  lib_version: Google::Cloud::Spanner::VERSION
64
71
  )
@@ -72,6 +79,8 @@ module Google
72
79
  credentials: credentials,
73
80
  timeout: timeout,
74
81
  client_config: client_config,
82
+ service_address: service_address,
83
+ service_port: service_port,
75
84
  lib_name: "gccl",
76
85
  lib_version: Google::Cloud::Spanner::VERSION
77
86
  )
@@ -408,6 +417,16 @@ module Google
408
417
 
409
418
  protected
410
419
 
420
+ def service_address
421
+ return nil if host.nil?
422
+ URI.parse("//#{host}").host
423
+ end
424
+
425
+ def service_port
426
+ return nil if host.nil?
427
+ URI.parse("//#{host}").port
428
+ end
429
+
411
430
  def default_options_from_session session_name
412
431
  default_prefix = session_name.split("/sessions/").first
413
432
  Google::Gax::CallOptions.new kwargs: \
@@ -25,6 +25,31 @@ module Google
25
25
  # The session to create.
26
26
  class CreateSessionRequest; end
27
27
 
28
+ # The request for
29
+ # {Google::Spanner::V1::Spanner::BatchCreateSessions BatchCreateSessions}.
30
+ # @!attribute [rw] database
31
+ # @return [String]
32
+ # Required. The database in which the new sessions are created.
33
+ # @!attribute [rw] session_template
34
+ # @return [Google::Spanner::V1::Session]
35
+ # Parameters to be applied to each created session.
36
+ # @!attribute [rw] session_count
37
+ # @return [Integer]
38
+ # Required. The number of sessions to be created in this batch call.
39
+ # The API may return fewer than the requested number of sessions. If a
40
+ # specific number of sessions are desired, the client can make additional
41
+ # calls to BatchCreateSessions (adjusting
42
+ # {Google::Spanner::V1::BatchCreateSessionsRequest#session_count session_count}
43
+ # as necessary).
44
+ class BatchCreateSessionsRequest; end
45
+
46
+ # The response for
47
+ # {Google::Spanner::V1::Spanner::BatchCreateSessions BatchCreateSessions}.
48
+ # @!attribute [rw] session
49
+ # @return [Array<Google::Spanner::V1::Session>]
50
+ # The freshly created sessions.
51
+ class BatchCreateSessionsResponse; end
52
+
28
53
  # A session in the Cloud Spanner API.
29
54
  # @!attribute [rw] name
30
55
  # @return [String]
@@ -108,9 +133,6 @@ module Google
108
133
  # Required. The session in which the SQL query should be performed.
109
134
  # @!attribute [rw] transaction
110
135
  # @return [Google::Spanner::V1::TransactionSelector]
111
- # The transaction to use. If none is provided, the default is a
112
- # temporary read-only transaction with strong concurrency.
113
- #
114
136
  # The transaction to use.
115
137
  #
116
138
  # For queries, if none is provided, the default is a temporary read-only
@@ -249,7 +271,9 @@ module Google
249
271
  # @return [Hash{String => Google::Spanner::V1::Type}]
250
272
  # It is not always possible for Cloud Spanner to infer the right SQL type
251
273
  # from a JSON value. For example, values of type `BYTES` and values
252
- # of type `STRING` both appear in {Google::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as JSON strings.
274
+ # of type `STRING` both appear in
275
+ # {Google::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as
276
+ # JSON strings.
253
277
  #
254
278
  # In these cases, `param_types` can be used to specify the exact
255
279
  # SQL type for some or all of the SQL statement parameters. See the
@@ -258,11 +282,13 @@ module Google
258
282
  class Statement; end
259
283
  end
260
284
 
261
- # The response for {Google::Spanner::V1::Spanner::ExecuteBatchDml ExecuteBatchDml}. Contains a list
262
- # of {Google::Spanner::V1::ResultSet ResultSet}, one for each DML statement that has successfully executed.
263
- # If a statement fails, the error is returned as part of the response payload.
264
- # Clients can determine whether all DML statements have run successfully, or if
265
- # a statement failed, using one of the following approaches:
285
+ # The response for
286
+ # {Google::Spanner::V1::Spanner::ExecuteBatchDml ExecuteBatchDml}. Contains a list
287
+ # of {Google::Spanner::V1::ResultSet ResultSet}, one for each DML statement that
288
+ # has successfully executed. If a statement fails, the error is returned as
289
+ # part of the response payload. Clients can determine whether all DML
290
+ # statements have run successfully, or if a statement failed, using one of the
291
+ # following approaches:
266
292
  #
267
293
  # 1. Check if 'status' field is OkStatus.
268
294
  # 2. Check if result_sets_size() equals the number of statements in
@@ -280,9 +306,11 @@ module Google
280
306
  # @!attribute [rw] result_sets
281
307
  # @return [Array<Google::Spanner::V1::ResultSet>]
282
308
  # ResultSets, one for each statement in the request that ran successfully, in
283
- # the same order as the statements in the request. Each {Google::Spanner::V1::ResultSet ResultSet} will
284
- # not contain any rows. The {Google::Spanner::V1::ResultSetStats ResultSetStats} in each {Google::Spanner::V1::ResultSet ResultSet} will
285
- # contain the number of rows modified by the statement.
309
+ # the same order as the statements in the request. Each
310
+ # {Google::Spanner::V1::ResultSet ResultSet} will not contain any rows. The
311
+ # {Google::Spanner::V1::ResultSetStats ResultSetStats} in each
312
+ # {Google::Spanner::V1::ResultSet ResultSet} will contain the number of rows
313
+ # modified by the statement.
286
314
  #
287
315
  # Only the first ResultSet in the response contains a valid
288
316
  # {Google::Spanner::V1::ResultSetMetadata ResultSetMetadata}.
@@ -229,6 +229,14 @@ module Google
229
229
  {'database' => request.database}
230
230
  end
231
231
  )
232
+ @batch_create_sessions = Google::Gax.create_api_call(
233
+ @spanner_stub.method(:batch_create_sessions),
234
+ defaults["batch_create_sessions"],
235
+ exception_transformer: exception_transformer,
236
+ params_extractor: proc do |request|
237
+ {'database' => request.database}
238
+ end
239
+ )
232
240
  @get_session = Google::Gax.create_api_call(
233
241
  @spanner_stub.method(:get_session),
234
242
  defaults["get_session"],
@@ -391,6 +399,54 @@ module Google
391
399
  @create_session.call(req, options, &block)
392
400
  end
393
401
 
402
+ # Creates multiple new sessions.
403
+ #
404
+ # This API can be used to initialize a session cache on the clients.
405
+ # See https://goo.gl/TgSFN2 for best practices on session cache management.
406
+ #
407
+ # @param database [String]
408
+ # Required. The database in which the new sessions are created.
409
+ # @param session_template [Google::Spanner::V1::Session | Hash]
410
+ # Parameters to be applied to each created session.
411
+ # A hash of the same form as `Google::Spanner::V1::Session`
412
+ # can also be provided.
413
+ # @param session_count [Integer]
414
+ # Required. The number of sessions to be created in this batch call.
415
+ # The API may return fewer than the requested number of sessions. If a
416
+ # specific number of sessions are desired, the client can make additional
417
+ # calls to BatchCreateSessions (adjusting
418
+ # {Google::Spanner::V1::BatchCreateSessionsRequest#session_count session_count}
419
+ # as necessary).
420
+ # @param options [Google::Gax::CallOptions]
421
+ # Overrides the default settings for this call, e.g, timeout,
422
+ # retries, etc.
423
+ # @yield [result, operation] Access the result along with the RPC operation
424
+ # @yieldparam result [Google::Spanner::V1::BatchCreateSessionsResponse]
425
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
426
+ # @return [Google::Spanner::V1::BatchCreateSessionsResponse]
427
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
428
+ # @example
429
+ # require "google/cloud/spanner/v1"
430
+ #
431
+ # spanner_client = Google::Cloud::Spanner::V1::SpannerClient.new
432
+ # formatted_database = Google::Cloud::Spanner::V1::SpannerClient.database_path("[PROJECT]", "[INSTANCE]", "[DATABASE]")
433
+ # response = spanner_client.batch_create_sessions(formatted_database)
434
+
435
+ def batch_create_sessions \
436
+ database,
437
+ session_template: nil,
438
+ session_count: nil,
439
+ options: nil,
440
+ &block
441
+ req = {
442
+ database: database,
443
+ session_template: session_template,
444
+ session_count: session_count
445
+ }.delete_if { |_, v| v.nil? }
446
+ req = Google::Gax::to_proto(req, Google::Spanner::V1::BatchCreateSessionsRequest)
447
+ @batch_create_sessions.call(req, options, &block)
448
+ end
449
+
394
450
  # Gets a session. Returns `NOT_FOUND` if the session does not exist.
395
451
  # This is mainly useful for determining whether a session is still
396
452
  # alive.
@@ -541,9 +597,6 @@ module Google
541
597
  # @param sql [String]
542
598
  # Required. The SQL string.
543
599
  # @param transaction [Google::Spanner::V1::TransactionSelector | Hash]
544
- # The transaction to use. If none is provided, the default is a
545
- # temporary read-only transaction with strong concurrency.
546
- #
547
600
  # The transaction to use.
548
601
  #
549
602
  # For queries, if none is provided, the default is a temporary read-only
@@ -671,9 +724,6 @@ module Google
671
724
  # @param sql [String]
672
725
  # Required. The SQL string.
673
726
  # @param transaction [Google::Spanner::V1::TransactionSelector | Hash]
674
- # The transaction to use. If none is provided, the default is a
675
- # temporary read-only transaction with strong concurrency.
676
- #
677
727
  # The transaction to use.
678
728
  #
679
729
  # For queries, if none is provided, the default is a temporary read-only
@@ -796,8 +846,9 @@ module Google
796
846
  #
797
847
  # Statements are executed in order, sequentially.
798
848
  # {Spanner::ExecuteBatchDmlResponse ExecuteBatchDmlResponse} will contain a
799
- # {Google::Spanner::V1::ResultSet ResultSet} for each DML statement that has successfully executed. If a
800
- # statement fails, its error status will be returned as part of the
849
+ # {Google::Spanner::V1::ResultSet ResultSet} for each DML statement that has
850
+ # successfully executed. If a statement fails, its error status will be
851
+ # returned as part of the
801
852
  # {Spanner::ExecuteBatchDmlResponse ExecuteBatchDmlResponse}. Execution will
802
853
  # stop at the first failed statement; the remaining statements will not run.
803
854
  #
@@ -45,6 +45,11 @@
45
45
  "retry_codes_name": "idempotent",
46
46
  "retry_params_name": "default"
47
47
  },
48
+ "BatchCreateSessions": {
49
+ "timeout_millis": 60000,
50
+ "retry_codes_name": "idempotent",
51
+ "retry_params_name": "default"
52
+ },
48
53
  "GetSession": {
49
54
  "timeout_millis": 30000,
50
55
  "retry_codes_name": "idempotent",
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Spanner
19
- VERSION = "1.9.5".freeze
19
+ VERSION = "1.10.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -19,6 +19,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
19
19
  optional :database, :string, 1
20
20
  optional :session, :message, 2, "google.spanner.v1.Session"
21
21
  end
22
+ add_message "google.spanner.v1.BatchCreateSessionsRequest" do
23
+ optional :database, :string, 1
24
+ optional :session_template, :message, 2, "google.spanner.v1.Session"
25
+ optional :session_count, :int32, 3
26
+ end
27
+ add_message "google.spanner.v1.BatchCreateSessionsResponse" do
28
+ repeated :session, :message, 1, "google.spanner.v1.Session"
29
+ end
22
30
  add_message "google.spanner.v1.Session" do
23
31
  optional :name, :string, 1
24
32
  map :labels, :string, :string, 2
@@ -136,6 +144,8 @@ module Google
136
144
  module Spanner
137
145
  module V1
138
146
  CreateSessionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CreateSessionRequest").msgclass
147
+ BatchCreateSessionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BatchCreateSessionsRequest").msgclass
148
+ BatchCreateSessionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BatchCreateSessionsResponse").msgclass
139
149
  Session = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Session").msgclass
140
150
  GetSessionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.GetSessionRequest").msgclass
141
151
  ListSessionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsRequest").msgclass
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/spanner/v1/spanner.proto for package 'google.spanner.v1'
3
3
  # Original file comments:
4
- # Copyright 2018 Google LLC.
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.
@@ -57,6 +57,11 @@ module Google
57
57
  # Idle sessions can be kept alive by sending a trivial SQL query
58
58
  # periodically, e.g., `"SELECT 1"`.
59
59
  rpc :CreateSession, CreateSessionRequest, Session
60
+ # Creates multiple new sessions.
61
+ #
62
+ # This API can be used to initialize a session cache on the clients.
63
+ # See https://goo.gl/TgSFN2 for best practices on session cache management.
64
+ rpc :BatchCreateSessions, BatchCreateSessionsRequest, BatchCreateSessionsResponse
60
65
  # Gets a session. Returns `NOT_FOUND` if the session does not exist.
61
66
  # This is mainly useful for determining whether a session is still
62
67
  # alive.
@@ -93,8 +98,9 @@ module Google
93
98
  #
94
99
  # Statements are executed in order, sequentially.
95
100
  # [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a
96
- # [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a
97
- # statement fails, its error status will be returned as part of the
101
+ # [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has
102
+ # successfully executed. If a statement fails, its error status will be
103
+ # returned as part of the
98
104
  # [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will
99
105
  # stop at the first failed statement; the remaining statements will not run.
100
106
  #
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: 1.9.5
4
+ version: 1.10.0
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-08-01 00:00:00.000000000 Z
12
+ date: 2019-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core