google-cloud-spanner 1.16.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +23 -0
  4. data/lib/google-cloud-spanner.rb +10 -13
  5. data/lib/google/cloud/spanner.rb +6 -8
  6. data/lib/google/cloud/spanner/admin/database/credentials.rb +2 -2
  7. data/lib/google/cloud/spanner/admin/instance/credentials.rb +2 -2
  8. data/lib/google/cloud/spanner/backup.rb +1 -1
  9. data/lib/google/cloud/spanner/backup/job.rb +2 -2
  10. data/lib/google/cloud/spanner/backup/job/list.rb +2 -2
  11. data/lib/google/cloud/spanner/backup/list.rb +1 -2
  12. data/lib/google/cloud/spanner/backup/restore/job.rb +2 -2
  13. data/lib/google/cloud/spanner/batch_client.rb +2 -2
  14. data/lib/google/cloud/spanner/batch_snapshot.rb +6 -8
  15. data/lib/google/cloud/spanner/batch_update.rb +1 -1
  16. data/lib/google/cloud/spanner/client.rb +8 -8
  17. data/lib/google/cloud/spanner/commit.rb +14 -14
  18. data/lib/google/cloud/spanner/convert.rb +7 -7
  19. data/lib/google/cloud/spanner/credentials.rb +2 -2
  20. data/lib/google/cloud/spanner/data.rb +2 -2
  21. data/lib/google/cloud/spanner/database.rb +22 -22
  22. data/lib/google/cloud/spanner/database/backup_info.rb +1 -1
  23. data/lib/google/cloud/spanner/database/job.rb +3 -3
  24. data/lib/google/cloud/spanner/database/job/list.rb +2 -2
  25. data/lib/google/cloud/spanner/database/list.rb +1 -1
  26. data/lib/google/cloud/spanner/database/restore_info.rb +1 -1
  27. data/lib/google/cloud/spanner/fields.rb +8 -8
  28. data/lib/google/cloud/spanner/instance.rb +5 -12
  29. data/lib/google/cloud/spanner/instance/config.rb +1 -1
  30. data/lib/google/cloud/spanner/instance/config/list.rb +1 -1
  31. data/lib/google/cloud/spanner/instance/job.rb +2 -2
  32. data/lib/google/cloud/spanner/instance/list.rb +1 -1
  33. data/lib/google/cloud/spanner/partition.rb +4 -4
  34. data/lib/google/cloud/spanner/policy.rb +2 -2
  35. data/lib/google/cloud/spanner/service.rb +209 -297
  36. data/lib/google/cloud/spanner/session.rb +9 -9
  37. data/lib/google/cloud/spanner/snapshot.rb +2 -2
  38. data/lib/google/cloud/spanner/transaction.rb +2 -2
  39. data/lib/google/cloud/spanner/version.rb +1 -1
  40. metadata +18 -107
  41. data/lib/google/cloud/spanner/admin/database.rb +0 -149
  42. data/lib/google/cloud/spanner/admin/database/v1.rb +0 -147
  43. data/lib/google/cloud/spanner/admin/database/v1/credentials.rb +0 -46
  44. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +0 -1513
  45. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client_config.json +0 -111
  46. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  47. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/options.rb +0 -33
  48. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +0 -151
  49. data/lib/google/cloud/spanner/admin/database/v1/doc/google/longrunning/operations.rb +0 -51
  50. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +0 -131
  51. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/empty.rb +0 -29
  52. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/field_mask.rb +0 -222
  53. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/timestamp.rb +0 -113
  54. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +0 -39
  55. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/backup.rb +0 -325
  56. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +0 -368
  57. data/lib/google/cloud/spanner/admin/database/v1/doc/google/type/expr.rb +0 -45
  58. data/lib/google/cloud/spanner/admin/instance.rb +0 -164
  59. data/lib/google/cloud/spanner/admin/instance/v1.rb +0 -162
  60. data/lib/google/cloud/spanner/admin/instance/v1/credentials.rb +0 -46
  61. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  62. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/options.rb +0 -33
  63. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +0 -151
  64. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/longrunning/operations.rb +0 -51
  65. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +0 -131
  66. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/empty.rb +0 -29
  67. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +0 -222
  68. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +0 -39
  69. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +0 -334
  70. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/type/expr.rb +0 -45
  71. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +0 -975
  72. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client_config.json +0 -76
  73. data/lib/google/cloud/spanner/v1.rb +0 -16
  74. data/lib/google/cloud/spanner/v1/credentials.rb +0 -42
  75. data/lib/google/cloud/spanner/v1/doc/google/protobuf/any.rb +0 -131
  76. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +0 -91
  77. data/lib/google/cloud/spanner/v1/doc/google/protobuf/empty.rb +0 -29
  78. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +0 -74
  79. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +0 -113
  80. data/lib/google/cloud/spanner/v1/doc/google/rpc/status.rb +0 -39
  81. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +0 -150
  82. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +0 -95
  83. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +0 -121
  84. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +0 -190
  85. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +0 -570
  86. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +0 -432
  87. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +0 -112
  88. data/lib/google/cloud/spanner/v1/spanner_client.rb +0 -1485
  89. data/lib/google/cloud/spanner/v1/spanner_client_config.json +0 -121
  90. data/lib/google/spanner/admin/database/v1/backup_pb.rb +0 -98
  91. data/lib/google/spanner/admin/database/v1/common_pb.rb +0 -28
  92. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +0 -141
  93. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +0 -169
  94. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +0 -125
  95. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +0 -181
  96. data/lib/google/spanner/v1/keys_pb.rb +0 -34
  97. data/lib/google/spanner/v1/mutation_pb.rb +0 -39
  98. data/lib/google/spanner/v1/query_plan_pb.rb +0 -48
  99. data/lib/google/spanner/v1/result_set_pb.rb +0 -48
  100. data/lib/google/spanner/v1/spanner_pb.rb +0 -179
  101. data/lib/google/spanner/v1/spanner_services_pb.rb +0 -179
  102. data/lib/google/spanner/v1/transaction_pb.rb +0 -56
  103. data/lib/google/spanner/v1/type_pb.rb +0 -44
@@ -1,179 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/v1/spanner.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/protobuf/empty_pb'
12
- require 'google/protobuf/struct_pb'
13
- require 'google/protobuf/timestamp_pb'
14
- require 'google/rpc/status_pb'
15
- require 'google/spanner/v1/keys_pb'
16
- require 'google/spanner/v1/mutation_pb'
17
- require 'google/spanner/v1/result_set_pb'
18
- require 'google/spanner/v1/transaction_pb'
19
- require 'google/spanner/v1/type_pb'
20
- Google::Protobuf::DescriptorPool.generated_pool.build do
21
- add_message "google.spanner.v1.CreateSessionRequest" do
22
- optional :database, :string, 1
23
- optional :session, :message, 2, "google.spanner.v1.Session"
24
- end
25
- add_message "google.spanner.v1.BatchCreateSessionsRequest" do
26
- optional :database, :string, 1
27
- optional :session_template, :message, 2, "google.spanner.v1.Session"
28
- optional :session_count, :int32, 3
29
- end
30
- add_message "google.spanner.v1.BatchCreateSessionsResponse" do
31
- repeated :session, :message, 1, "google.spanner.v1.Session"
32
- end
33
- add_message "google.spanner.v1.Session" do
34
- optional :name, :string, 1
35
- map :labels, :string, :string, 2
36
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
37
- optional :approximate_last_use_time, :message, 4, "google.protobuf.Timestamp"
38
- end
39
- add_message "google.spanner.v1.GetSessionRequest" do
40
- optional :name, :string, 1
41
- end
42
- add_message "google.spanner.v1.ListSessionsRequest" do
43
- optional :database, :string, 1
44
- optional :page_size, :int32, 2
45
- optional :page_token, :string, 3
46
- optional :filter, :string, 4
47
- end
48
- add_message "google.spanner.v1.ListSessionsResponse" do
49
- repeated :sessions, :message, 1, "google.spanner.v1.Session"
50
- optional :next_page_token, :string, 2
51
- end
52
- add_message "google.spanner.v1.DeleteSessionRequest" do
53
- optional :name, :string, 1
54
- end
55
- add_message "google.spanner.v1.ExecuteSqlRequest" do
56
- optional :session, :string, 1
57
- optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
58
- optional :sql, :string, 3
59
- optional :params, :message, 4, "google.protobuf.Struct"
60
- map :param_types, :string, :message, 5, "google.spanner.v1.Type"
61
- optional :resume_token, :bytes, 6
62
- optional :query_mode, :enum, 7, "google.spanner.v1.ExecuteSqlRequest.QueryMode"
63
- optional :partition_token, :bytes, 8
64
- optional :seqno, :int64, 9
65
- optional :query_options, :message, 10, "google.spanner.v1.ExecuteSqlRequest.QueryOptions"
66
- end
67
- add_message "google.spanner.v1.ExecuteSqlRequest.QueryOptions" do
68
- optional :optimizer_version, :string, 1
69
- end
70
- add_enum "google.spanner.v1.ExecuteSqlRequest.QueryMode" do
71
- value :NORMAL, 0
72
- value :PLAN, 1
73
- value :PROFILE, 2
74
- end
75
- add_message "google.spanner.v1.ExecuteBatchDmlRequest" do
76
- optional :session, :string, 1
77
- optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
78
- repeated :statements, :message, 3, "google.spanner.v1.ExecuteBatchDmlRequest.Statement"
79
- optional :seqno, :int64, 4
80
- end
81
- add_message "google.spanner.v1.ExecuteBatchDmlRequest.Statement" do
82
- optional :sql, :string, 1
83
- optional :params, :message, 2, "google.protobuf.Struct"
84
- map :param_types, :string, :message, 3, "google.spanner.v1.Type"
85
- end
86
- add_message "google.spanner.v1.ExecuteBatchDmlResponse" do
87
- repeated :result_sets, :message, 1, "google.spanner.v1.ResultSet"
88
- optional :status, :message, 2, "google.rpc.Status"
89
- end
90
- add_message "google.spanner.v1.PartitionOptions" do
91
- optional :partition_size_bytes, :int64, 1
92
- optional :max_partitions, :int64, 2
93
- end
94
- add_message "google.spanner.v1.PartitionQueryRequest" do
95
- optional :session, :string, 1
96
- optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
97
- optional :sql, :string, 3
98
- optional :params, :message, 4, "google.protobuf.Struct"
99
- map :param_types, :string, :message, 5, "google.spanner.v1.Type"
100
- optional :partition_options, :message, 6, "google.spanner.v1.PartitionOptions"
101
- end
102
- add_message "google.spanner.v1.PartitionReadRequest" do
103
- optional :session, :string, 1
104
- optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
105
- optional :table, :string, 3
106
- optional :index, :string, 4
107
- repeated :columns, :string, 5
108
- optional :key_set, :message, 6, "google.spanner.v1.KeySet"
109
- optional :partition_options, :message, 9, "google.spanner.v1.PartitionOptions"
110
- end
111
- add_message "google.spanner.v1.Partition" do
112
- optional :partition_token, :bytes, 1
113
- end
114
- add_message "google.spanner.v1.PartitionResponse" do
115
- repeated :partitions, :message, 1, "google.spanner.v1.Partition"
116
- optional :transaction, :message, 2, "google.spanner.v1.Transaction"
117
- end
118
- add_message "google.spanner.v1.ReadRequest" do
119
- optional :session, :string, 1
120
- optional :transaction, :message, 2, "google.spanner.v1.TransactionSelector"
121
- optional :table, :string, 3
122
- optional :index, :string, 4
123
- repeated :columns, :string, 5
124
- optional :key_set, :message, 6, "google.spanner.v1.KeySet"
125
- optional :limit, :int64, 8
126
- optional :resume_token, :bytes, 9
127
- optional :partition_token, :bytes, 10
128
- end
129
- add_message "google.spanner.v1.BeginTransactionRequest" do
130
- optional :session, :string, 1
131
- optional :options, :message, 2, "google.spanner.v1.TransactionOptions"
132
- end
133
- add_message "google.spanner.v1.CommitRequest" do
134
- optional :session, :string, 1
135
- repeated :mutations, :message, 4, "google.spanner.v1.Mutation"
136
- oneof :transaction do
137
- optional :transaction_id, :bytes, 2
138
- optional :single_use_transaction, :message, 3, "google.spanner.v1.TransactionOptions"
139
- end
140
- end
141
- add_message "google.spanner.v1.CommitResponse" do
142
- optional :commit_timestamp, :message, 1, "google.protobuf.Timestamp"
143
- end
144
- add_message "google.spanner.v1.RollbackRequest" do
145
- optional :session, :string, 1
146
- optional :transaction_id, :bytes, 2
147
- end
148
- end
149
-
150
- module Google
151
- module Spanner
152
- module V1
153
- CreateSessionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CreateSessionRequest").msgclass
154
- BatchCreateSessionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BatchCreateSessionsRequest").msgclass
155
- BatchCreateSessionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BatchCreateSessionsResponse").msgclass
156
- Session = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Session").msgclass
157
- GetSessionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.GetSessionRequest").msgclass
158
- ListSessionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsRequest").msgclass
159
- ListSessionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ListSessionsResponse").msgclass
160
- DeleteSessionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.DeleteSessionRequest").msgclass
161
- ExecuteSqlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest").msgclass
162
- ExecuteSqlRequest::QueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryOptions").msgclass
163
- ExecuteSqlRequest::QueryMode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteSqlRequest.QueryMode").enummodule
164
- ExecuteBatchDmlRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteBatchDmlRequest").msgclass
165
- ExecuteBatchDmlRequest::Statement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteBatchDmlRequest.Statement").msgclass
166
- ExecuteBatchDmlResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ExecuteBatchDmlResponse").msgclass
167
- PartitionOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartitionOptions").msgclass
168
- PartitionQueryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartitionQueryRequest").msgclass
169
- PartitionReadRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartitionReadRequest").msgclass
170
- Partition = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Partition").msgclass
171
- PartitionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartitionResponse").msgclass
172
- ReadRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ReadRequest").msgclass
173
- BeginTransactionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.BeginTransactionRequest").msgclass
174
- CommitRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitRequest").msgclass
175
- CommitResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass
176
- RollbackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RollbackRequest").msgclass
177
- end
178
- end
179
- end
@@ -1,179 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/spanner/v1/spanner.proto for package 'google.spanner.v1'
3
- # Original file comments:
4
- # Copyright 2020 Google LLC
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
-
20
- require 'grpc'
21
- require 'google/spanner/v1/spanner_pb'
22
-
23
- module Google
24
- module Spanner
25
- module V1
26
- module Spanner
27
- # Cloud Spanner API
28
- #
29
- # The Cloud Spanner API can be used to manage sessions and execute
30
- # transactions on data stored in Cloud Spanner databases.
31
- class Service
32
-
33
- include GRPC::GenericService
34
-
35
- self.marshal_class_method = :encode
36
- self.unmarshal_class_method = :decode
37
- self.service_name = 'google.spanner.v1.Spanner'
38
-
39
- # Creates a new session. A session can be used to perform
40
- # transactions that read and/or modify data in a Cloud Spanner database.
41
- # Sessions are meant to be reused for many consecutive
42
- # transactions.
43
- #
44
- # Sessions can only execute one transaction at a time. To execute
45
- # multiple concurrent read-write/write-only transactions, create
46
- # multiple sessions. Note that standalone reads and queries use a
47
- # transaction internally, and count toward the one transaction
48
- # limit.
49
- #
50
- # Active sessions use additional server resources, so it is a good idea to
51
- # delete idle and unneeded sessions.
52
- # Aside from explicit deletes, Cloud Spanner may delete sessions for which no
53
- # operations are sent for more than an hour. If a session is deleted,
54
- # requests to it return `NOT_FOUND`.
55
- #
56
- # Idle sessions can be kept alive by sending a trivial SQL query
57
- # periodically, e.g., `"SELECT 1"`.
58
- rpc :CreateSession, CreateSessionRequest, Session
59
- # Creates multiple new sessions.
60
- #
61
- # This API can be used to initialize a session cache on the clients.
62
- # See https://goo.gl/TgSFN2 for best practices on session cache management.
63
- rpc :BatchCreateSessions, BatchCreateSessionsRequest, BatchCreateSessionsResponse
64
- # Gets a session. Returns `NOT_FOUND` if the session does not exist.
65
- # This is mainly useful for determining whether a session is still
66
- # alive.
67
- rpc :GetSession, GetSessionRequest, Session
68
- # Lists all sessions in a given database.
69
- rpc :ListSessions, ListSessionsRequest, ListSessionsResponse
70
- # Ends a session, releasing server resources associated with it. This will
71
- # asynchronously trigger cancellation of any operations that are running with
72
- # this session.
73
- rpc :DeleteSession, DeleteSessionRequest, Google::Protobuf::Empty
74
- # Executes an SQL statement, returning all results in a single reply. This
75
- # method cannot be used to return a result set larger than 10 MiB;
76
- # if the query yields more data than that, the query fails with
77
- # a `FAILED_PRECONDITION` error.
78
- #
79
- # Operations inside read-write transactions might return `ABORTED`. If
80
- # this occurs, the application should restart the transaction from
81
- # the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
82
- #
83
- # Larger result sets can be fetched in streaming fashion by calling
84
- # [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
85
- rpc :ExecuteSql, ExecuteSqlRequest, ResultSet
86
- # Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
87
- # set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
88
- # is no limit on the size of the returned result set. However, no
89
- # individual row in the result set can exceed 100 MiB, and no
90
- # column value can exceed 10 MiB.
91
- rpc :ExecuteStreamingSql, ExecuteSqlRequest, stream(PartialResultSet)
92
- # Executes a batch of SQL DML statements. This method allows many statements
93
- # to be run with lower latency than submitting them sequentially with
94
- # [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
95
- #
96
- # Statements are executed in sequential order. A request can succeed even if
97
- # a statement fails. The [ExecuteBatchDmlResponse.status][google.spanner.v1.ExecuteBatchDmlResponse.status] field in the
98
- # response provides information about the statement that failed. Clients must
99
- # inspect this field to determine whether an error occurred.
100
- #
101
- # Execution stops after the first failed statement; the remaining statements
102
- # are not executed.
103
- rpc :ExecuteBatchDml, ExecuteBatchDmlRequest, ExecuteBatchDmlResponse
104
- # Reads rows from the database using key lookups and scans, as a
105
- # simple key/value style alternative to
106
- # [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
107
- # return a result set larger than 10 MiB; if the read matches more
108
- # data than that, the read fails with a `FAILED_PRECONDITION`
109
- # error.
110
- #
111
- # Reads inside read-write transactions might return `ABORTED`. If
112
- # this occurs, the application should restart the transaction from
113
- # the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
114
- #
115
- # Larger result sets can be yielded in streaming fashion by calling
116
- # [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
117
- rpc :Read, ReadRequest, ResultSet
118
- # Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
119
- # stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
120
- # size of the returned result set. However, no individual row in
121
- # the result set can exceed 100 MiB, and no column value can exceed
122
- # 10 MiB.
123
- rpc :StreamingRead, ReadRequest, stream(PartialResultSet)
124
- # Begins a new transaction. This step can often be skipped:
125
- # [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
126
- # [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
127
- # side-effect.
128
- rpc :BeginTransaction, BeginTransactionRequest, Transaction
129
- # Commits a transaction. The request includes the mutations to be
130
- # applied to rows in the database.
131
- #
132
- # `Commit` might return an `ABORTED` error. This can occur at any time;
133
- # commonly, the cause is conflicts with concurrent
134
- # transactions. However, it can also happen for a variety of other
135
- # reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
136
- # the transaction from the beginning, re-using the same session.
137
- rpc :Commit, CommitRequest, CommitResponse
138
- # Rolls back a transaction, releasing any locks it holds. It is a good
139
- # idea to call this for any transaction that includes one or more
140
- # [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
141
- # ultimately decides not to commit.
142
- #
143
- # `Rollback` returns `OK` if it successfully aborts the transaction, the
144
- # transaction was already aborted, or the transaction is not
145
- # found. `Rollback` never returns `ABORTED`.
146
- rpc :Rollback, RollbackRequest, Google::Protobuf::Empty
147
- # Creates a set of partition tokens that can be used to execute a query
148
- # operation in parallel. Each of the returned partition tokens can be used
149
- # by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to specify a subset
150
- # of the query result to read. The same session and read-only transaction
151
- # must be used by the PartitionQueryRequest used to create the
152
- # partition tokens and the ExecuteSqlRequests that use the partition tokens.
153
- #
154
- # Partition tokens become invalid when the session used to create them
155
- # is deleted, is idle for too long, begins a new transaction, or becomes too
156
- # old. When any of these happen, it is not possible to resume the query, and
157
- # the whole operation must be restarted from the beginning.
158
- rpc :PartitionQuery, PartitionQueryRequest, PartitionResponse
159
- # Creates a set of partition tokens that can be used to execute a read
160
- # operation in parallel. Each of the returned partition tokens can be used
161
- # by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a subset of the read
162
- # result to read. The same session and read-only transaction must be used by
163
- # the PartitionReadRequest used to create the partition tokens and the
164
- # ReadRequests that use the partition tokens. There are no ordering
165
- # guarantees on rows returned among the returned partition tokens, or even
166
- # within each individual StreamingRead call issued with a partition_token.
167
- #
168
- # Partition tokens become invalid when the session used to create them
169
- # is deleted, is idle for too long, begins a new transaction, or becomes too
170
- # old. When any of these happen, it is not possible to resume the read, and
171
- # the whole operation must be restarted from the beginning.
172
- rpc :PartitionRead, PartitionReadRequest, PartitionResponse
173
- end
174
-
175
- Stub = Service.rpc_stub_class
176
- end
177
- end
178
- end
179
- end
@@ -1,56 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/v1/transaction.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/protobuf/duration_pb'
8
- require 'google/protobuf/timestamp_pb'
9
- require 'google/api/annotations_pb'
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_message "google.spanner.v1.TransactionOptions" do
12
- oneof :mode do
13
- optional :read_write, :message, 1, "google.spanner.v1.TransactionOptions.ReadWrite"
14
- optional :partitioned_dml, :message, 3, "google.spanner.v1.TransactionOptions.PartitionedDml"
15
- optional :read_only, :message, 2, "google.spanner.v1.TransactionOptions.ReadOnly"
16
- end
17
- end
18
- add_message "google.spanner.v1.TransactionOptions.ReadWrite" do
19
- end
20
- add_message "google.spanner.v1.TransactionOptions.PartitionedDml" do
21
- end
22
- add_message "google.spanner.v1.TransactionOptions.ReadOnly" do
23
- optional :return_read_timestamp, :bool, 6
24
- oneof :timestamp_bound do
25
- optional :strong, :bool, 1
26
- optional :min_read_timestamp, :message, 2, "google.protobuf.Timestamp"
27
- optional :max_staleness, :message, 3, "google.protobuf.Duration"
28
- optional :read_timestamp, :message, 4, "google.protobuf.Timestamp"
29
- optional :exact_staleness, :message, 5, "google.protobuf.Duration"
30
- end
31
- end
32
- add_message "google.spanner.v1.Transaction" do
33
- optional :id, :bytes, 1
34
- optional :read_timestamp, :message, 2, "google.protobuf.Timestamp"
35
- end
36
- add_message "google.spanner.v1.TransactionSelector" do
37
- oneof :selector do
38
- optional :single_use, :message, 1, "google.spanner.v1.TransactionOptions"
39
- optional :id, :bytes, 2
40
- optional :begin, :message, 3, "google.spanner.v1.TransactionOptions"
41
- end
42
- end
43
- end
44
-
45
- module Google
46
- module Spanner
47
- module V1
48
- TransactionOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions").msgclass
49
- TransactionOptions::ReadWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadWrite").msgclass
50
- TransactionOptions::PartitionedDml = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.PartitionedDml").msgclass
51
- TransactionOptions::ReadOnly = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadOnly").msgclass
52
- Transaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Transaction").msgclass
53
- TransactionSelector = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionSelector").msgclass
54
- end
55
- end
56
- end
@@ -1,44 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/spanner/v1/type.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_message "google.spanner.v1.Type" do
10
- optional :code, :enum, 1, "google.spanner.v1.TypeCode"
11
- optional :array_element_type, :message, 2, "google.spanner.v1.Type"
12
- optional :struct_type, :message, 3, "google.spanner.v1.StructType"
13
- end
14
- add_message "google.spanner.v1.StructType" do
15
- repeated :fields, :message, 1, "google.spanner.v1.StructType.Field"
16
- end
17
- add_message "google.spanner.v1.StructType.Field" do
18
- optional :name, :string, 1
19
- optional :type, :message, 2, "google.spanner.v1.Type"
20
- end
21
- add_enum "google.spanner.v1.TypeCode" do
22
- value :TYPE_CODE_UNSPECIFIED, 0
23
- value :BOOL, 1
24
- value :INT64, 2
25
- value :FLOAT64, 3
26
- value :TIMESTAMP, 4
27
- value :DATE, 5
28
- value :STRING, 6
29
- value :BYTES, 7
30
- value :ARRAY, 8
31
- value :STRUCT, 9
32
- end
33
- end
34
-
35
- module Google
36
- module Spanner
37
- module V1
38
- Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Type").msgclass
39
- StructType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType").msgclass
40
- StructType::Field = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType.Field").msgclass
41
- TypeCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeCode").enummodule
42
- end
43
- end
44
- end