google-cloud-spanner 1.16.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +58 -0
  4. data/CONTRIBUTING.md +6 -6
  5. data/TROUBLESHOOTING.md +0 -6
  6. data/lib/google-cloud-spanner.rb +11 -13
  7. data/lib/google/cloud/spanner.rb +13 -13
  8. data/lib/google/cloud/spanner/admin/database/credentials.rb +2 -2
  9. data/lib/google/cloud/spanner/admin/instance/credentials.rb +2 -2
  10. data/lib/google/cloud/spanner/backup.rb +1 -1
  11. data/lib/google/cloud/spanner/backup/job.rb +2 -2
  12. data/lib/google/cloud/spanner/backup/job/list.rb +2 -2
  13. data/lib/google/cloud/spanner/backup/list.rb +1 -2
  14. data/lib/google/cloud/spanner/backup/restore/job.rb +2 -2
  15. data/lib/google/cloud/spanner/batch_client.rb +2 -2
  16. data/lib/google/cloud/spanner/batch_snapshot.rb +120 -23
  17. data/lib/google/cloud/spanner/batch_update.rb +1 -1
  18. data/lib/google/cloud/spanner/client.rb +388 -47
  19. data/lib/google/cloud/spanner/commit.rb +14 -14
  20. data/lib/google/cloud/spanner/commit_response.rb +87 -0
  21. data/lib/google/cloud/spanner/commit_response/commit_stats.rb +51 -0
  22. data/lib/google/cloud/spanner/convert.rb +16 -7
  23. data/lib/google/cloud/spanner/credentials.rb +2 -2
  24. data/lib/google/cloud/spanner/data.rb +2 -2
  25. data/lib/google/cloud/spanner/database.rb +22 -22
  26. data/lib/google/cloud/spanner/database/backup_info.rb +1 -1
  27. data/lib/google/cloud/spanner/database/job.rb +3 -3
  28. data/lib/google/cloud/spanner/database/job/list.rb +2 -2
  29. data/lib/google/cloud/spanner/database/list.rb +1 -1
  30. data/lib/google/cloud/spanner/database/restore_info.rb +1 -1
  31. data/lib/google/cloud/spanner/fields.rb +8 -8
  32. data/lib/google/cloud/spanner/instance.rb +5 -12
  33. data/lib/google/cloud/spanner/instance/config.rb +1 -1
  34. data/lib/google/cloud/spanner/instance/config/list.rb +1 -1
  35. data/lib/google/cloud/spanner/instance/job.rb +2 -2
  36. data/lib/google/cloud/spanner/instance/list.rb +1 -1
  37. data/lib/google/cloud/spanner/partition.rb +4 -4
  38. data/lib/google/cloud/spanner/policy.rb +2 -2
  39. data/lib/google/cloud/spanner/results.rb +103 -24
  40. data/lib/google/cloud/spanner/service.rb +367 -349
  41. data/lib/google/cloud/spanner/session.rb +370 -39
  42. data/lib/google/cloud/spanner/snapshot.rb +60 -6
  43. data/lib/google/cloud/spanner/transaction.rb +116 -10
  44. data/lib/google/cloud/spanner/version.rb +1 -1
  45. metadata +20 -107
  46. data/lib/google/cloud/spanner/admin/database.rb +0 -149
  47. data/lib/google/cloud/spanner/admin/database/v1.rb +0 -147
  48. data/lib/google/cloud/spanner/admin/database/v1/credentials.rb +0 -46
  49. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +0 -1513
  50. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client_config.json +0 -111
  51. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  52. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/options.rb +0 -33
  53. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +0 -151
  54. data/lib/google/cloud/spanner/admin/database/v1/doc/google/longrunning/operations.rb +0 -51
  55. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +0 -131
  56. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/empty.rb +0 -29
  57. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/field_mask.rb +0 -222
  58. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/timestamp.rb +0 -113
  59. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +0 -39
  60. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/backup.rb +0 -325
  61. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +0 -368
  62. data/lib/google/cloud/spanner/admin/database/v1/doc/google/type/expr.rb +0 -45
  63. data/lib/google/cloud/spanner/admin/instance.rb +0 -164
  64. data/lib/google/cloud/spanner/admin/instance/v1.rb +0 -162
  65. data/lib/google/cloud/spanner/admin/instance/v1/credentials.rb +0 -46
  66. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  67. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/options.rb +0 -33
  68. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +0 -151
  69. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/longrunning/operations.rb +0 -51
  70. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +0 -131
  71. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/empty.rb +0 -29
  72. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +0 -222
  73. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +0 -39
  74. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +0 -334
  75. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/type/expr.rb +0 -45
  76. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +0 -975
  77. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client_config.json +0 -76
  78. data/lib/google/cloud/spanner/v1.rb +0 -16
  79. data/lib/google/cloud/spanner/v1/credentials.rb +0 -42
  80. data/lib/google/cloud/spanner/v1/doc/google/protobuf/any.rb +0 -131
  81. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +0 -91
  82. data/lib/google/cloud/spanner/v1/doc/google/protobuf/empty.rb +0 -29
  83. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +0 -74
  84. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +0 -113
  85. data/lib/google/cloud/spanner/v1/doc/google/rpc/status.rb +0 -39
  86. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +0 -150
  87. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +0 -95
  88. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +0 -121
  89. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +0 -190
  90. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +0 -570
  91. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +0 -432
  92. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +0 -112
  93. data/lib/google/cloud/spanner/v1/spanner_client.rb +0 -1485
  94. data/lib/google/cloud/spanner/v1/spanner_client_config.json +0 -121
  95. data/lib/google/spanner/admin/database/v1/backup_pb.rb +0 -98
  96. data/lib/google/spanner/admin/database/v1/common_pb.rb +0 -28
  97. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +0 -141
  98. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +0 -169
  99. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +0 -125
  100. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +0 -181
  101. data/lib/google/spanner/v1/keys_pb.rb +0 -34
  102. data/lib/google/spanner/v1/mutation_pb.rb +0 -39
  103. data/lib/google/spanner/v1/query_plan_pb.rb +0 -48
  104. data/lib/google/spanner/v1/result_set_pb.rb +0 -48
  105. data/lib/google/spanner/v1/spanner_pb.rb +0 -179
  106. data/lib/google/spanner/v1/spanner_services_pb.rb +0 -179
  107. data/lib/google/spanner/v1/transaction_pb.rb +0 -56
  108. data/lib/google/spanner/v1/type_pb.rb +0 -44
@@ -96,8 +96,8 @@ module Google
96
96
  rows.delete_if(&:nil?)
97
97
  rows.delete_if(&:empty?)
98
98
  @mutations += rows.map do |row|
99
- Google::Spanner::V1::Mutation.new(
100
- insert_or_update: Google::Spanner::V1::Mutation::Write.new(
99
+ V1::Mutation.new(
100
+ insert_or_update: V1::Mutation::Write.new(
101
101
  table: table, columns: row.keys.map(&:to_s),
102
102
  values: [Convert.object_to_grpc_value(row.values).list_value]
103
103
  )
@@ -154,8 +154,8 @@ module Google
154
154
  rows.delete_if(&:nil?)
155
155
  rows.delete_if(&:empty?)
156
156
  @mutations += rows.map do |row|
157
- Google::Spanner::V1::Mutation.new(
158
- insert: Google::Spanner::V1::Mutation::Write.new(
157
+ V1::Mutation.new(
158
+ insert: V1::Mutation::Write.new(
159
159
  table: table, columns: row.keys.map(&:to_s),
160
160
  values: [Convert.object_to_grpc_value(row.values).list_value]
161
161
  )
@@ -211,8 +211,8 @@ module Google
211
211
  rows.delete_if(&:nil?)
212
212
  rows.delete_if(&:empty?)
213
213
  @mutations += rows.map do |row|
214
- Google::Spanner::V1::Mutation.new(
215
- update: Google::Spanner::V1::Mutation::Write.new(
214
+ V1::Mutation.new(
215
+ update: V1::Mutation::Write.new(
216
216
  table: table, columns: row.keys.map(&:to_s),
217
217
  values: [Convert.object_to_grpc_value(row.values).list_value]
218
218
  )
@@ -270,8 +270,8 @@ module Google
270
270
  rows.delete_if(&:nil?)
271
271
  rows.delete_if(&:empty?)
272
272
  @mutations += rows.map do |row|
273
- Google::Spanner::V1::Mutation.new(
274
- replace: Google::Spanner::V1::Mutation::Write.new(
273
+ V1::Mutation.new(
274
+ replace: V1::Mutation::Write.new(
275
275
  table: table, columns: row.keys.map(&:to_s),
276
276
  values: [Convert.object_to_grpc_value(row.values).list_value]
277
277
  )
@@ -306,8 +306,8 @@ module Google
306
306
  #
307
307
  def delete table, keys = []
308
308
  @mutations += [
309
- Google::Spanner::V1::Mutation.new(
310
- delete: Google::Spanner::V1::Mutation::Delete.new(
309
+ V1::Mutation.new(
310
+ delete: V1::Mutation::Delete.new(
311
311
  table: table, key_set: key_set(keys)
312
312
  )
313
313
  )
@@ -323,20 +323,20 @@ module Google
323
323
  protected
324
324
 
325
325
  def key_set keys
326
- return Google::Spanner::V1::KeySet.new all: true if keys.nil?
326
+ return V1::KeySet.new all: true if keys.nil?
327
327
  keys = [keys] unless keys.is_a? Array
328
- return Google::Spanner::V1::KeySet.new all: true if keys.empty?
328
+ return V1::KeySet.new all: true if keys.empty?
329
329
  if keys_are_ranges? keys
330
330
  key_ranges = keys.map do |r|
331
331
  Convert.to_key_range r
332
332
  end
333
- return Google::Spanner::V1::KeySet.new ranges: key_ranges
333
+ return V1::KeySet.new ranges: key_ranges
334
334
  end
335
335
  key_list = keys.map do |key|
336
336
  key = [key] unless key.is_a? Array
337
337
  Convert.object_to_grpc_value(key).list_value
338
338
  end
339
- Google::Spanner::V1::KeySet.new keys: key_list
339
+ V1::KeySet.new keys: key_list
340
340
  end
341
341
 
342
342
  def keys_are_ranges? keys
@@ -0,0 +1,87 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ require "google/cloud/spanner/commit_response/commit_stats"
17
+
18
+ module Google
19
+ module Cloud
20
+ module Spanner
21
+ ##
22
+ # CommitResponse is a timestamp at which the transaction committed
23
+ # with additional attributes of commit stats.
24
+ #
25
+ # @example
26
+ # require "google/cloud/spanner"
27
+ #
28
+ # spanner = Google::Cloud::Spanner.new
29
+ #
30
+ # db = spanner.client "my-instance", "my-database"
31
+ #
32
+ # timestamp = db.commit do |c|
33
+ # c.update "users", [{ id: 1, name: "Charlie", active: false }]
34
+ # c.insert "users", [{ id: 2, name: "Harvey", active: true }]
35
+ # end
36
+ #
37
+ # puts timestamp
38
+ #
39
+ # @example With commit stats.
40
+ # require "google/cloud/spanner"
41
+ #
42
+ # spanner = Google::Cloud::Spanner.new
43
+ #
44
+ # db = spanner.client "my-instance", "my-database"
45
+ #
46
+ # commit_options = { return_commit_stats: true }
47
+ # commit_resp = db.commit commit_options: commit_options do |c|
48
+ # c.update "users", [{ id: 1, name: "Charlie", active: false }]
49
+ # c.insert "users", [{ id: 2, name: "Harvey", active: true }]
50
+ # end
51
+ #
52
+ # puts commit_resp.timestamp
53
+ # puts commit_resp.stats.mutation_count
54
+ #
55
+ class CommitResponse
56
+ ##
57
+ # @private Creates a new CommitResponse instance.
58
+ def initialize grpc
59
+ @grpc = grpc
60
+ end
61
+
62
+ ##
63
+ # The timestamp at which the transaction committed.
64
+ # @return [Time]
65
+ def timestamp
66
+ Convert.timestamp_to_time @grpc.commit_timestamp
67
+ end
68
+
69
+ ##
70
+ # Additional statistics about a commit.
71
+ # @return [CommitStats, nil] Commit stats or nil if not stats not
72
+ # present.
73
+ def stats
74
+ CommitStats.from_grpc @grpc.commit_stats if @grpc.commit_stats
75
+ end
76
+
77
+ ##
78
+ # @private
79
+ # Creates a new Commit responsee instance from a
80
+ # `Google::Cloud::Spanner::V1::CommitResponse`.
81
+ def self.from_grpc grpc
82
+ new grpc
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,51 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ require "google/cloud/spanner/convert"
17
+
18
+ module Google
19
+ module Cloud
20
+ module Spanner
21
+ class CommitResponse
22
+ ##
23
+ # # CommitStats
24
+ #
25
+ # Statistical information of a transaction commit.
26
+ #
27
+ class CommitStats
28
+ ##
29
+ # @private Creates a new CommitStats instance.
30
+ def initialize grpc
31
+ @grpc = grpc
32
+ end
33
+
34
+ # The total number of the mutations for the transaction.
35
+ # @return [Integer]
36
+ def mutation_count
37
+ @grpc.mutation_count
38
+ end
39
+
40
+ ##
41
+ # @private
42
+ # Creates a new CommitStats instance from a
43
+ # `Google::Cloud::Spanner::V1::CommitResponse::CommitStats`.
44
+ def self.from_grpc grpc
45
+ new grpc
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -17,6 +17,7 @@ require "time"
17
17
  require "date"
18
18
  require "stringio"
19
19
  require "base64"
20
+ require "bigdecimal"
20
21
  require "google/cloud/spanner/data"
21
22
 
22
23
  module Google
@@ -67,6 +68,9 @@ module Google
67
68
  Google::Protobuf::Value.new bool_value: false
68
69
  when Integer
69
70
  Google::Protobuf::Value.new string_value: obj.to_s
71
+ # BigDecimal must be put before Numeric.
72
+ when BigDecimal
73
+ Google::Protobuf::Value.new string_value: obj.to_s("F")
70
74
  when Numeric
71
75
  if obj == Float::INFINITY
72
76
  Google::Protobuf::Value.new string_value: "Infinity"
@@ -125,6 +129,9 @@ module Google
125
129
  :BOOL
126
130
  when Integer
127
131
  :INT64
132
+ # BigDecimal must be put before Numeric.
133
+ when BigDecimal
134
+ :NUMERIC
128
135
  when Numeric
129
136
  :FLOAT64
130
137
  when Time
@@ -169,12 +176,12 @@ module Google
169
176
  return field.to_grpc_type if field.respond_to? :to_grpc_type
170
177
 
171
178
  if Array === field
172
- Google::Spanner::V1::Type.new(
179
+ V1::Type.new(
173
180
  code: :ARRAY,
174
181
  array_element_type: grpc_type_for_field(field.first)
175
182
  )
176
183
  else
177
- Google::Spanner::V1::Type.new(code: field)
184
+ V1::Type.new(code: field)
178
185
  end
179
186
  end
180
187
 
@@ -214,6 +221,8 @@ module Google
214
221
  end
215
222
  when :STRUCT
216
223
  Data.from_grpc value.list_value.values, type.struct_type.fields
224
+ when :NUMERIC
225
+ BigDecimal value.string_value
217
226
  end
218
227
  end
219
228
 
@@ -274,24 +283,24 @@ module Google
274
283
  range_opts.delete :end_closed
275
284
  end
276
285
 
277
- Google::Spanner::V1::KeyRange.new range_opts
286
+ V1::KeyRange.new range_opts
278
287
  end
279
288
 
280
289
  def to_key_set keys
281
- return Google::Spanner::V1::KeySet.new(all: true) if keys.nil?
290
+ return V1::KeySet.new(all: true) if keys.nil?
282
291
  keys = [keys] unless keys.is_a? Array
283
- return Google::Spanner::V1::KeySet.new(all: true) if keys.empty?
292
+ return V1::KeySet.new(all: true) if keys.empty?
284
293
 
285
294
  if keys_are_ranges? keys
286
295
  key_ranges = keys.map { |r| to_key_range(r) }
287
- return Google::Spanner::V1::KeySet.new(ranges: key_ranges)
296
+ return V1::KeySet.new(ranges: key_ranges)
288
297
  end
289
298
 
290
299
  key_list = keys.map do |key|
291
300
  key = [key] unless key.is_a? Array
292
301
  object_to_grpc_value(key).list_value
293
302
  end
294
- Google::Spanner::V1::KeySet.new keys: key_list
303
+ V1::KeySet.new keys: key_list
295
304
  end
296
305
 
297
306
  def keys_are_ranges? keys
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- require "google/cloud/spanner/v1/credentials"
16
+ require "google/cloud/spanner/v1/spanner/credentials"
17
17
 
18
18
  module Google
19
19
  module Cloud
@@ -37,7 +37,7 @@ module Google
37
37
  #
38
38
  # spanner.project_id #=> "my-project"
39
39
  #
40
- class Credentials < Google::Cloud::Spanner::V1::Credentials
40
+ class Credentials < Google::Cloud::Spanner::V1::Spanner::Credentials
41
41
  end
42
42
  end
43
43
  end
@@ -216,9 +216,9 @@ module Google
216
216
  ##
217
217
  # @private
218
218
  def to_grpc_type
219
- Google::Spanner::V1::Type.new(
219
+ V1::Type.new(
220
220
  code: :STRUCT,
221
- struct_type: Google::Spanner::V1::StructType.new(
221
+ struct_type: V1::StructType.new(
222
222
  fields: @grpc_fields
223
223
  )
224
224
  )
@@ -229,7 +229,6 @@ module Google
229
229
  true
230
230
  end
231
231
 
232
-
233
232
  # @private
234
233
  DATBASE_OPERATION_METADAT_FILTER_TEMPLATE = [
235
234
  "(metadata.@type:CreateDatabaseMetadata AND " \
@@ -248,10 +247,10 @@ module Google
248
247
  # response.
249
248
  #
250
249
  # The response returns a list of
251
- # {Google::Longrunning::Operation long-running operations} whose names
250
+ # `Google::Longrunning::Operation` long-running operations whose names
252
251
  # are prefixed by a database name within the specified instance.
253
252
  # The long-running operation
254
- # {Google::Longrunning::Operation#metadata metadata} field type
253
+ # `Google::Longrunning::Operation#metadata` metadata field type
255
254
  # `metadata.type_url` describes the type of the metadata.
256
255
  #
257
256
  # The filter expression must specify the field name,
@@ -384,10 +383,9 @@ module Google
384
383
  )
385
384
  end
386
385
 
387
- grpc = service.list_database_operations \
388
- instance_id,
389
- filter: database_filter,
390
- page_size: page_size
386
+ grpc = service.list_database_operations instance_id,
387
+ filter: database_filter,
388
+ page_size: page_size
391
389
  Database::Job::List.from_grpc grpc, service
392
390
  end
393
391
 
@@ -573,20 +571,22 @@ module Google
573
571
  #
574
572
  # The permissions that can be checked on a database are:
575
573
  #
576
- # * pubsub.databases.create
577
- # * pubsub.databases.list
578
- # * pubsub.databases.update
579
- # * pubsub.databases.updateDdl
580
- # * pubsub.databases.get
581
- # * pubsub.databases.getDdl
582
- # * pubsub.databases.getIamPolicy
583
- # * pubsub.databases.setIamPolicy
584
- # * pubsub.databases.beginReadOnlyTransaction
585
- # * pubsub.databases.beginOrRollbackReadWriteTransaction
586
- # * pubsub.databases.read
587
- # * pubsub.databases.select
588
- # * pubsub.databases.write
589
- # * pubsub.databases.drop
574
+ # * spanner.databases.beginPartitionedDmlTransaction
575
+ # * spanner.databases.create
576
+ # * spanner.databases.createBackup
577
+ # * spanner.databases.list
578
+ # * spanner.databases.update
579
+ # * spanner.databases.updateDdl
580
+ # * spanner.databases.get
581
+ # * spanner.databases.getDdl
582
+ # * spanner.databases.getIamPolicy
583
+ # * spanner.databases.setIamPolicy
584
+ # * spanner.databases.beginReadOnlyTransaction
585
+ # * spanner.databases.beginOrRollbackReadWriteTransaction
586
+ # * spanner.databases.read
587
+ # * spanner.databases.select
588
+ # * spanner.databases.write
589
+ # * spanner.databases.drop
590
590
  #
591
591
  # @return [Array<Strings>] The permissions that have access.
592
592
  #
@@ -611,7 +611,7 @@ module Google
611
611
 
612
612
  ##
613
613
  # @private Creates a new Database instance from a
614
- # Google::Spanner::Admin::Database::V1::Database.
614
+ # `Google::Cloud::Spanner::Admin::Database::V1::Database`.
615
615
  def self.from_grpc grpc, service
616
616
  new grpc, service
617
617
  end
@@ -94,7 +94,7 @@ module Google
94
94
 
95
95
  ##
96
96
  # @private Creates a new Database::BackupInfo instance from a
97
- # Google::Spanner::Admin::Database::V1::BackupInfo.
97
+ # `Google::Cloud::Spanner::Admin::Database::V1::BackupInfo`.
98
98
  def self.from_grpc grpc
99
99
  new grpc
100
100
  end
@@ -52,7 +52,7 @@ module Google
52
52
  #
53
53
  class Job
54
54
  ##
55
- # @private The Google::Gax::Operation gRPC object.
55
+ # @private The `Gapic::Operation` gRPC object.
56
56
  attr_accessor :grpc
57
57
 
58
58
  ##
@@ -89,7 +89,7 @@ module Google
89
89
  return nil unless done?
90
90
  return nil unless @grpc.grpc_op.result == :response
91
91
  return nil unless @grpc.results.instance_of? \
92
- Google::Spanner::Admin::Database::V1::Database
92
+ Admin::Database::V1::Database
93
93
  Database.from_grpc @grpc.results, service
94
94
  end
95
95
 
@@ -201,7 +201,7 @@ module Google
201
201
  end
202
202
 
203
203
  ##
204
- # @private New Database::Job from a Google::Gax::Operation object.
204
+ # @private New Database::Job from a `Gapic::Operation` object.
205
205
  def self.from_grpc grpc, service
206
206
  new.tap do |job|
207
207
  job.instance_variable_set :@grpc, grpc
@@ -146,7 +146,7 @@ module Google
146
146
  # @private
147
147
  #
148
148
  # New Database::Job::List from a
149
- # Google::Gax::PagedEnumerable<Google::Longrunning::Operation>
149
+ # `Gapic::PagedEnumerable<Google::Longrunning::Operation>`
150
150
  # object. Operation object is a database operation.
151
151
  #
152
152
  def self.from_grpc grpc, service
@@ -154,7 +154,7 @@ module Google
154
154
  service.databases.instance_variable_get "@operations_client"
155
155
  jobs = new(Array(grpc.response.operations).map do |job_grpc|
156
156
  Job.from_grpc \
157
- Google::Gax::Operation.new(job_grpc, operations_client),
157
+ Gapic::Operation.new(job_grpc, operations_client),
158
158
  service
159
159
  end)
160
160
  jobs.grpc = grpc