google-cloud-spanner-v1 1.5.0 → 1.7.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/spanner/v1/spanner/client.rb +11 -0
- data/lib/google/cloud/spanner/v1/version.rb +1 -1
- data/lib/google/spanner/v1/result_set_pb.rb +1 -1
- data/lib/google/spanner/v1/transaction_pb.rb +2 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/protobuf/struct.rb +12 -0
- data/proto_docs/google/spanner/v1/keys.rb +8 -0
- data/proto_docs/google/spanner/v1/mutation.rb +10 -0
- data/proto_docs/google/spanner/v1/result_set.rb +58 -47
- data/proto_docs/google/spanner/v1/spanner.rb +8 -0
- data/proto_docs/google/spanner/v1/transaction.rb +70 -1
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1667e8dd7541d5f00dbd8ec7ffce37dab1a398d914a19c04f4005ec53206bbd
|
4
|
+
data.tar.gz: a6f63d4162d5e539ad5ba4bd6bf0075c2e7b8d27b14090a41c2a6a6882246660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1658b52163c6e7cfcd933d2edea3e9052a49f44b401d4750a9968be5701bcee94e1439edb8ae6e3abe42ba697c5a4788c16184ff7bdd917e1d5e52bede6db1
|
7
|
+
data.tar.gz: 7b3060171334a765b030e17363576eabc013f6e0fbfeb1290c5aeb471dd7dad760a7a122d63ad27c7f7dd76e7b4d5c35d87fe442e60dc526383894601f38f6bd
|
data/README.md
CHANGED
@@ -85,7 +85,7 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
|
|
85
85
|
|
86
86
|
## Supported Ruby Versions
|
87
87
|
|
88
|
-
This library is supported on Ruby
|
88
|
+
This library is supported on Ruby 3.0+.
|
89
89
|
|
90
90
|
Google provides official support for Ruby versions that are actively supported
|
91
91
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -1707,6 +1707,8 @@ module Google
|
|
1707
1707
|
# Required. The session in which the transaction to be committed is running.
|
1708
1708
|
# @param transaction_id [::String]
|
1709
1709
|
# Commit a previously-started transaction.
|
1710
|
+
#
|
1711
|
+
# Note: The following fields are mutually exclusive: `transaction_id`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1710
1712
|
# @param single_use_transaction [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash]
|
1711
1713
|
# Execute mutations in a temporary transaction. Note that unlike
|
1712
1714
|
# commit of a previously-started transaction, commit with a
|
@@ -1717,6 +1719,8 @@ module Google
|
|
1717
1719
|
# executed more than once. If this is undesirable, use
|
1718
1720
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and
|
1719
1721
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead.
|
1722
|
+
#
|
1723
|
+
# Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1720
1724
|
# @param mutations [::Array<::Google::Cloud::Spanner::V1::Mutation, ::Hash>]
|
1721
1725
|
# The mutations to be executed when this transaction commits. All
|
1722
1726
|
# mutations are applied atomically, in the order they appear in
|
@@ -2326,6 +2330,13 @@ module Google
|
|
2326
2330
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2327
2331
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2328
2332
|
# * (`nil`) indicating no credentials
|
2333
|
+
#
|
2334
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
2335
|
+
# external source for authentication to Google Cloud, you must validate it before
|
2336
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
2337
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
2338
|
+
# For more information, refer to [Validate credential configurations from external
|
2339
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
2329
2340
|
# @return [::Object]
|
2330
2341
|
# @!attribute [rw] scope
|
2331
2342
|
# The OAuth scopes
|
@@ -11,7 +11,7 @@ require 'google/spanner/v1/transaction_pb'
|
|
11
11
|
require 'google/spanner/v1/type_pb'
|
12
12
|
|
13
13
|
|
14
|
-
descriptor_data = "\n\"google/spanner/v1/result_set.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\"google/spanner/v1/query_plan.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\xf2\x01\n\tResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12(\n\x04rows\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x30\n\x05stats\x18\x03 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x05 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\"\
|
14
|
+
descriptor_data = "\n\"google/spanner/v1/result_set.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\"google/spanner/v1/query_plan.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\xf2\x01\n\tResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12(\n\x04rows\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x30\n\x05stats\x18\x03 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x05 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\"\xb7\x02\n\x10PartialResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x15\n\rchunked_value\x18\x03 \x01(\x08\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12\x30\n\x05stats\x18\x05 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x08 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x11\n\x04last\x18\t \x01(\x08\x42\x03\xe0\x41\x01\"\xb7\x01\n\x11ResultSetMetadata\x12/\n\x08row_type\x18\x01 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\x12<\n\x15undeclared_parameters\x18\x03 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\"\xb9\x01\n\x0eResultSetStats\x12\x30\n\nquery_plan\x18\x01 \x01(\x0b\x32\x1c.google.spanner.v1.QueryPlan\x12,\n\x0bquery_stats\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x19\n\x0frow_count_exact\x18\x03 \x01(\x03H\x00\x12\x1f\n\x15row_count_lower_bound\x18\x04 \x01(\x03H\x00\x42\x0b\n\trow_countB\xb1\x01\n\x15\x63om.google.spanner.v1B\x0eResultSetProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3"
|
15
15
|
|
16
16
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
17
|
|
@@ -9,7 +9,7 @@ require 'google/protobuf/duration_pb'
|
|
9
9
|
require 'google/protobuf/timestamp_pb'
|
10
10
|
|
11
11
|
|
12
|
-
descriptor_data = "\n#google/spanner/v1/transaction.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
12
|
+
descriptor_data = "\n#google/spanner/v1/transaction.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf7\x07\n\x12TransactionOptions\x12\x45\n\nread_write\x18\x01 \x01(\x0b\x32/.google.spanner.v1.TransactionOptions.ReadWriteH\x00\x12O\n\x0fpartitioned_dml\x18\x03 \x01(\x0b\x32\x34.google.spanner.v1.TransactionOptions.PartitionedDmlH\x00\x12\x43\n\tread_only\x18\x02 \x01(\x0b\x32..google.spanner.v1.TransactionOptions.ReadOnlyH\x00\x12\'\n\x1f\x65xclude_txn_from_change_streams\x18\x05 \x01(\x08\x12M\n\x0fisolation_level\x18\x06 \x01(\x0e\x32\x34.google.spanner.v1.TransactionOptions.IsolationLevel\x1a\xec\x01\n\tReadWrite\x12T\n\x0eread_lock_mode\x18\x01 \x01(\x0e\x32<.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode\x12\x38\n+multiplexed_session_previous_transaction_id\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01\"O\n\x0cReadLockMode\x12\x1e\n\x1aREAD_LOCK_MODE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPESSIMISTIC\x10\x01\x12\x0e\n\nOPTIMISTIC\x10\x02\x1a\x10\n\x0ePartitionedDml\x1a\xa8\x02\n\x08ReadOnly\x12\x10\n\x06strong\x18\x01 \x01(\x08H\x00\x12\x38\n\x12min_read_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x32\n\rmax_staleness\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x34\n\x0eread_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x34\n\x0f\x65xact_staleness\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x1d\n\x15return_read_timestamp\x18\x06 \x01(\x08\x42\x11\n\x0ftimestamp_bound\"X\n\x0eIsolationLevel\x12\x1f\n\x1bISOLATION_LEVEL_UNSPECIFIED\x10\x00\x12\x10\n\x0cSERIALIZABLE\x10\x01\x12\x13\n\x0fREPEATABLE_READ\x10\x02\x42\x06\n\x04mode\"\x9b\x01\n\x0bTransaction\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x32\n\x0eread_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x0fprecommit_token\x18\x03 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitToken\"\xa4\x01\n\x13TransactionSelector\x12;\n\nsingle_use\x18\x01 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x12\x0c\n\x02id\x18\x02 \x01(\x0cH\x00\x12\x36\n\x05\x62\x65gin\x18\x03 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x42\n\n\x08selector\"L\n MultiplexedSessionPrecommitToken\x12\x17\n\x0fprecommit_token\x18\x01 \x01(\x0c\x12\x0f\n\x07seq_num\x18\x02 \x01(\x05\x42\xb3\x01\n\x15\x63om.google.spanner.v1B\x10TransactionProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3"
|
13
13
|
|
14
14
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
15
|
|
@@ -46,6 +46,7 @@ module Google
|
|
46
46
|
TransactionOptions::ReadWrite::ReadLockMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode").enummodule
|
47
47
|
TransactionOptions::PartitionedDml = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.PartitionedDml").msgclass
|
48
48
|
TransactionOptions::ReadOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.ReadOnly").msgclass
|
49
|
+
TransactionOptions::IsolationLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionOptions.IsolationLevel").enummodule
|
49
50
|
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Transaction").msgclass
|
50
51
|
TransactionSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TransactionSelector").msgclass
|
51
52
|
MultiplexedSessionPrecommitToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.MultiplexedSessionPrecommitToken").msgclass
|
@@ -221,6 +221,12 @@ module Google
|
|
221
221
|
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
222
|
# enabled by default 1 month after launching the feature in preview
|
223
223
|
# packages.
|
224
|
+
# @!attribute [rw] unversioned_package_disabled
|
225
|
+
# @return [::Boolean]
|
226
|
+
# Disables generation of an unversioned Python package for this client
|
227
|
+
# library. This means that the module names will need to be versioned in
|
228
|
+
# import statements. For example `import google.cloud.library_v2` instead
|
229
|
+
# of `import google.cloud.library`.
|
224
230
|
class ExperimentalFeatures
|
225
231
|
include ::Google::Protobuf::MessageExts
|
226
232
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -409,6 +415,14 @@ module Google
|
|
409
415
|
# @return [::Array<::String>]
|
410
416
|
# An allowlist of the fully qualified names of RPCs that should be included
|
411
417
|
# on public client surfaces.
|
418
|
+
# @!attribute [rw] generate_omitted_as_internal
|
419
|
+
# @return [::Boolean]
|
420
|
+
# Setting this to true indicates to the client generators that methods
|
421
|
+
# that would be excluded from the generation should instead be generated
|
422
|
+
# in a way that indicates these methods should not be consumed by
|
423
|
+
# end users. How this is expressed is up to individual language
|
424
|
+
# implementations to decide. Some examples may be: added annotations,
|
425
|
+
# obfuscated identifiers, or other language idiomatic patterns.
|
412
426
|
class SelectiveGapicGeneration
|
413
427
|
include ::Google::Protobuf::MessageExts
|
414
428
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -53,21 +53,33 @@ module Google
|
|
53
53
|
# @!attribute [rw] null_value
|
54
54
|
# @return [::Google::Protobuf::NullValue]
|
55
55
|
# Represents a null value.
|
56
|
+
#
|
57
|
+
# Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
56
58
|
# @!attribute [rw] number_value
|
57
59
|
# @return [::Float]
|
58
60
|
# Represents a double value.
|
61
|
+
#
|
62
|
+
# Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
59
63
|
# @!attribute [rw] string_value
|
60
64
|
# @return [::String]
|
61
65
|
# Represents a string value.
|
66
|
+
#
|
67
|
+
# Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
62
68
|
# @!attribute [rw] bool_value
|
63
69
|
# @return [::Boolean]
|
64
70
|
# Represents a boolean value.
|
71
|
+
#
|
72
|
+
# Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
65
73
|
# @!attribute [rw] struct_value
|
66
74
|
# @return [::Google::Protobuf::Struct]
|
67
75
|
# Represents a structured value.
|
76
|
+
#
|
77
|
+
# Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
68
78
|
# @!attribute [rw] list_value
|
69
79
|
# @return [::Google::Protobuf::ListValue]
|
70
80
|
# Represents a repeated `Value`.
|
81
|
+
#
|
82
|
+
# Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
71
83
|
class Value
|
72
84
|
include ::Google::Protobuf::MessageExts
|
73
85
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -113,18 +113,26 @@ module Google
|
|
113
113
|
# @return [::Google::Protobuf::ListValue]
|
114
114
|
# If the start is closed, then the range includes all rows whose
|
115
115
|
# first `len(start_closed)` key columns exactly match `start_closed`.
|
116
|
+
#
|
117
|
+
# Note: The following fields are mutually exclusive: `start_closed`, `start_open`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
116
118
|
# @!attribute [rw] start_open
|
117
119
|
# @return [::Google::Protobuf::ListValue]
|
118
120
|
# If the start is open, then the range excludes rows whose first
|
119
121
|
# `len(start_open)` key columns exactly match `start_open`.
|
122
|
+
#
|
123
|
+
# Note: The following fields are mutually exclusive: `start_open`, `start_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
120
124
|
# @!attribute [rw] end_closed
|
121
125
|
# @return [::Google::Protobuf::ListValue]
|
122
126
|
# If the end is closed, then the range includes all rows whose
|
123
127
|
# first `len(end_closed)` key columns exactly match `end_closed`.
|
128
|
+
#
|
129
|
+
# Note: The following fields are mutually exclusive: `end_closed`, `end_open`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
124
130
|
# @!attribute [rw] end_open
|
125
131
|
# @return [::Google::Protobuf::ListValue]
|
126
132
|
# If the end is open, then the range excludes rows whose first
|
127
133
|
# `len(end_open)` key columns exactly match `end_open`.
|
134
|
+
#
|
135
|
+
# Note: The following fields are mutually exclusive: `end_open`, `end_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
128
136
|
class KeyRange
|
129
137
|
include ::Google::Protobuf::MessageExts
|
130
138
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -28,10 +28,14 @@ module Google
|
|
28
28
|
# @return [::Google::Cloud::Spanner::V1::Mutation::Write]
|
29
29
|
# Insert new rows in a table. If any of the rows already exist,
|
30
30
|
# the write or transaction fails with error `ALREADY_EXISTS`.
|
31
|
+
#
|
32
|
+
# Note: The following fields are mutually exclusive: `insert`, `update`, `insert_or_update`, `replace`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
31
33
|
# @!attribute [rw] update
|
32
34
|
# @return [::Google::Cloud::Spanner::V1::Mutation::Write]
|
33
35
|
# Update existing rows in a table. If any of the rows does not
|
34
36
|
# already exist, the transaction fails with error `NOT_FOUND`.
|
37
|
+
#
|
38
|
+
# Note: The following fields are mutually exclusive: `update`, `insert`, `insert_or_update`, `replace`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
35
39
|
# @!attribute [rw] insert_or_update
|
36
40
|
# @return [::Google::Cloud::Spanner::V1::Mutation::Write]
|
37
41
|
# Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row already exists, then
|
@@ -41,6 +45,8 @@ module Google
|
|
41
45
|
# When using {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, just as when using {::Google::Cloud::Spanner::V1::Mutation#insert insert}, all `NOT
|
42
46
|
# NULL` columns in the table must be given a value. This holds true
|
43
47
|
# even when the row already exists and will therefore actually be updated.
|
48
|
+
#
|
49
|
+
# Note: The following fields are mutually exclusive: `insert_or_update`, `insert`, `update`, `replace`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
44
50
|
# @!attribute [rw] replace
|
45
51
|
# @return [::Google::Cloud::Spanner::V1::Mutation::Write]
|
46
52
|
# Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row already exists, it is
|
@@ -52,10 +58,14 @@ module Google
|
|
52
58
|
# `ON DELETE CASCADE` annotation, then replacing a parent row
|
53
59
|
# also deletes the child rows. Otherwise, you must delete the
|
54
60
|
# child rows before you replace the parent row.
|
61
|
+
#
|
62
|
+
# Note: The following fields are mutually exclusive: `replace`, `insert`, `update`, `insert_or_update`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
55
63
|
# @!attribute [rw] delete
|
56
64
|
# @return [::Google::Cloud::Spanner::V1::Mutation::Delete]
|
57
65
|
# Delete rows from a table. Succeeds whether or not the named
|
58
66
|
# rows were present.
|
67
|
+
#
|
68
|
+
# Note: The following fields are mutually exclusive: `delete`, `insert`, `update`, `insert_or_update`, `replace`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
59
69
|
class Mutation
|
60
70
|
include ::Google::Protobuf::MessageExts
|
61
71
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -29,11 +29,10 @@ module Google
|
|
29
29
|
# @!attribute [rw] rows
|
30
30
|
# @return [::Array<::Google::Protobuf::ListValue>]
|
31
31
|
# Each element in `rows` is a row whose format is defined by
|
32
|
-
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. The ith
|
33
|
-
# in each row matches the ith field in
|
34
|
-
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. Elements
|
35
|
-
# encoded based on type as described
|
36
|
-
# {::Google::Cloud::Spanner::V1::TypeCode here}.
|
32
|
+
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. The ith
|
33
|
+
# element in each row matches the ith field in
|
34
|
+
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. Elements
|
35
|
+
# are encoded based on type as described {::Google::Cloud::Spanner::V1::TypeCode here}.
|
37
36
|
# @!attribute [rw] stats
|
38
37
|
# @return [::Google::Cloud::Spanner::V1::ResultSetStats]
|
39
38
|
# Query plan and execution statistics for the SQL statement that
|
@@ -41,18 +40,16 @@ module Google
|
|
41
40
|
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}.
|
42
41
|
# DML statements always produce stats containing the number of rows
|
43
42
|
# modified, unless executed using the
|
44
|
-
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::PLAN ExecuteSqlRequest.QueryMode.PLAN}
|
45
|
-
#
|
43
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::PLAN ExecuteSqlRequest.QueryMode.PLAN}
|
44
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}.
|
45
|
+
# Other fields might or might not be populated, based on the
|
46
46
|
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}.
|
47
47
|
# @!attribute [rw] precommit_token
|
48
48
|
# @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken]
|
49
|
-
# Optional. A precommit token
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# attempt should be passed to the
|
49
|
+
# Optional. A precommit token is included if the read-write transaction is on
|
50
|
+
# a multiplexed session. Pass the precommit token with the highest sequence
|
51
|
+
# number from this transaction attempt to the
|
53
52
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction.
|
54
|
-
# This feature is not yet supported and will result in an UNIMPLEMENTED
|
55
|
-
# error.
|
56
53
|
class ResultSet
|
57
54
|
include ::Google::Protobuf::MessageExts
|
58
55
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -76,13 +73,14 @@ module Google
|
|
76
73
|
# Most values are encoded based on type as described
|
77
74
|
# {::Google::Cloud::Spanner::V1::TypeCode here}.
|
78
75
|
#
|
79
|
-
# It
|
76
|
+
# It's possible that the last value in values is "chunked",
|
80
77
|
# meaning that the rest of the value is sent in subsequent
|
81
|
-
# `PartialResultSet`(s). This is denoted by the
|
82
|
-
# field.
|
83
|
-
# complete value as
|
78
|
+
# `PartialResultSet`(s). This is denoted by the
|
79
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet#chunked_value chunked_value} field.
|
80
|
+
# Two or more chunked values can be merged to form a complete value as
|
81
|
+
# follows:
|
84
82
|
#
|
85
|
-
# * `bool/number/null`:
|
83
|
+
# * `bool/number/null`: can't be chunked
|
86
84
|
# * `string`: concatenate the strings
|
87
85
|
# * `list`: concatenate the lists. If the last element in a list is a
|
88
86
|
# `string`, `list`, or `object`, merge it with the first element in
|
@@ -93,28 +91,28 @@ module Google
|
|
93
91
|
#
|
94
92
|
# Some examples of merging:
|
95
93
|
#
|
96
|
-
#
|
94
|
+
# Strings are concatenated.
|
97
95
|
# "foo", "bar" => "foobar"
|
98
96
|
#
|
99
|
-
#
|
97
|
+
# Lists of non-strings are concatenated.
|
100
98
|
# [2, 3], [4] => [2, 3, 4]
|
101
99
|
#
|
102
|
-
#
|
103
|
-
#
|
100
|
+
# Lists are concatenated, but the last and first elements are merged
|
101
|
+
# because they are strings.
|
104
102
|
# ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
|
105
103
|
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
104
|
+
# Lists are concatenated, but the last and first elements are merged
|
105
|
+
# because they are lists. Recursively, the last and first elements
|
106
|
+
# of the inner lists are merged because they are strings.
|
109
107
|
# ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"]
|
110
108
|
#
|
111
|
-
#
|
109
|
+
# Non-overlapping object fields are combined.
|
112
110
|
# {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"}
|
113
111
|
#
|
114
|
-
#
|
112
|
+
# Overlapping object fields are merged.
|
115
113
|
# {"a": "1"}, {"a": "2"} => {"a": "12"}
|
116
114
|
#
|
117
|
-
#
|
115
|
+
# Examples of merging objects containing lists of strings.
|
118
116
|
# {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]}
|
119
117
|
#
|
120
118
|
# For a more complete example, suppose a streaming SQL query is
|
@@ -130,7 +128,6 @@ module Google
|
|
130
128
|
# {
|
131
129
|
# "values": ["orl"]
|
132
130
|
# "chunked_value": true
|
133
|
-
# "resume_token": "Bqp2..."
|
134
131
|
# }
|
135
132
|
# {
|
136
133
|
# "values": ["d"]
|
@@ -140,11 +137,17 @@ module Google
|
|
140
137
|
# This sequence of `PartialResultSet`s encodes two rows, one
|
141
138
|
# containing the field value `"Hello"`, and a second containing the
|
142
139
|
# field value `"World" = "W" + "orl" + "d"`.
|
140
|
+
#
|
141
|
+
# Not all `PartialResultSet`s contain a `resume_token`. Execution can only be
|
142
|
+
# resumed from a previously yielded `resume_token`. For the above sequence of
|
143
|
+
# `PartialResultSet`s, resuming the query with `"resume_token": "Af65..."`
|
144
|
+
# yields results from the `PartialResultSet` with value "orl".
|
143
145
|
# @!attribute [rw] chunked_value
|
144
146
|
# @return [::Boolean]
|
145
|
-
# If true, then the final value in
|
146
|
-
#
|
147
|
-
# to obtain a
|
147
|
+
# If true, then the final value in
|
148
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet#values values} is chunked, and must be
|
149
|
+
# combined with more values from subsequent `PartialResultSet`s to obtain a
|
150
|
+
# complete field value.
|
148
151
|
# @!attribute [rw] resume_token
|
149
152
|
# @return [::String]
|
150
153
|
# Streaming calls might be interrupted for a variety of reasons, such
|
@@ -156,29 +159,31 @@ module Google
|
|
156
159
|
# @return [::Google::Cloud::Spanner::V1::ResultSetStats]
|
157
160
|
# Query plan and execution statistics for the statement that produced this
|
158
161
|
# streaming result set. These can be requested by setting
|
159
|
-
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}
|
160
|
-
# only once with the last response in the stream.
|
161
|
-
#
|
162
|
-
# statements.
|
162
|
+
# {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}
|
163
|
+
# and are sent only once with the last response in the stream. This field is
|
164
|
+
# also present in the last response for DML statements.
|
163
165
|
# @!attribute [rw] precommit_token
|
164
166
|
# @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken]
|
165
|
-
# Optional. A precommit token
|
166
|
-
#
|
167
|
-
#
|
168
|
-
# attempt should be passed to the
|
167
|
+
# Optional. A precommit token is included if the read-write transaction
|
168
|
+
# has multiplexed sessions enabled. Pass the precommit token with the highest
|
169
|
+
# sequence number from this transaction attempt to the
|
169
170
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction.
|
170
|
-
#
|
171
|
-
#
|
171
|
+
# @!attribute [rw] last
|
172
|
+
# @return [::Boolean]
|
173
|
+
# Optional. Indicates whether this is the last `PartialResultSet` in the
|
174
|
+
# stream. The server might optionally set this field. Clients shouldn't rely
|
175
|
+
# on this field being set in all cases.
|
172
176
|
class PartialResultSet
|
173
177
|
include ::Google::Protobuf::MessageExts
|
174
178
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
175
179
|
end
|
176
180
|
|
177
|
-
# Metadata about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or
|
181
|
+
# Metadata about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or
|
182
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}.
|
178
183
|
# @!attribute [rw] row_type
|
179
184
|
# @return [::Google::Cloud::Spanner::V1::StructType]
|
180
185
|
# Indicates the field names and types for the rows in the result
|
181
|
-
# set.
|
186
|
+
# set. For example, a SQL query like `"SELECT UserId, UserName FROM
|
182
187
|
# Users"` could return a `row_type` value like:
|
183
188
|
#
|
184
189
|
# "fields": [
|
@@ -206,10 +211,12 @@ module Google
|
|
206
211
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
212
|
end
|
208
213
|
|
209
|
-
# Additional statistics about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or
|
214
|
+
# Additional statistics about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or
|
215
|
+
# {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}.
|
210
216
|
# @!attribute [rw] query_plan
|
211
217
|
# @return [::Google::Cloud::Spanner::V1::QueryPlan]
|
212
|
-
# {::Google::Cloud::Spanner::V1::QueryPlan QueryPlan} for the query associated with this
|
218
|
+
# {::Google::Cloud::Spanner::V1::QueryPlan QueryPlan} for the query associated with this
|
219
|
+
# result.
|
213
220
|
# @!attribute [rw] query_stats
|
214
221
|
# @return [::Google::Protobuf::Struct]
|
215
222
|
# Aggregated statistics from the execution of the query. Only present when
|
@@ -224,10 +231,14 @@ module Google
|
|
224
231
|
# @!attribute [rw] row_count_exact
|
225
232
|
# @return [::Integer]
|
226
233
|
# Standard DML returns an exact count of rows that were modified.
|
234
|
+
#
|
235
|
+
# Note: The following fields are mutually exclusive: `row_count_exact`, `row_count_lower_bound`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
227
236
|
# @!attribute [rw] row_count_lower_bound
|
228
237
|
# @return [::Integer]
|
229
|
-
# Partitioned DML
|
238
|
+
# Partitioned DML doesn't offer exactly-once semantics, so it
|
230
239
|
# returns a lower bound of the rows modified.
|
240
|
+
#
|
241
|
+
# Note: The following fields are mutually exclusive: `row_count_lower_bound`, `row_count_exact`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
231
242
|
class ResultSetStats
|
232
243
|
include ::Google::Protobuf::MessageExts
|
233
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -251,11 +251,15 @@ module Google
|
|
251
251
|
# true and all replicas are exhausted without finding a healthy replica,
|
252
252
|
# Spanner will wait for a replica in the list to become available, requests
|
253
253
|
# may fail due to `DEADLINE_EXCEEDED` errors.
|
254
|
+
#
|
255
|
+
# Note: The following fields are mutually exclusive: `include_replicas`, `exclude_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
254
256
|
# @!attribute [rw] exclude_replicas
|
255
257
|
# @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ExcludeReplicas]
|
256
258
|
# Exclude_replicas indicates that specified replicas should be excluded
|
257
259
|
# from serving requests. Spanner will not route requests to the replicas
|
258
260
|
# in this list.
|
261
|
+
#
|
262
|
+
# Note: The following fields are mutually exclusive: `exclude_replicas`, `include_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
259
263
|
class DirectedReadOptions
|
260
264
|
include ::Google::Protobuf::MessageExts
|
261
265
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -1029,6 +1033,8 @@ module Google
|
|
1029
1033
|
# @!attribute [rw] transaction_id
|
1030
1034
|
# @return [::String]
|
1031
1035
|
# Commit a previously-started transaction.
|
1036
|
+
#
|
1037
|
+
# Note: The following fields are mutually exclusive: `transaction_id`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1032
1038
|
# @!attribute [rw] single_use_transaction
|
1033
1039
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions]
|
1034
1040
|
# Execute mutations in a temporary transaction. Note that unlike
|
@@ -1040,6 +1046,8 @@ module Google
|
|
1040
1046
|
# executed more than once. If this is undesirable, use
|
1041
1047
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and
|
1042
1048
|
# {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead.
|
1049
|
+
#
|
1050
|
+
# Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1043
1051
|
# @!attribute [rw] mutations
|
1044
1052
|
# @return [::Array<::Google::Cloud::Spanner::V1::Mutation>]
|
1045
1053
|
# The mutations to be executed when this transaction commits. All
|
@@ -352,6 +352,8 @@ module Google
|
|
352
352
|
# Authorization to begin a read-write transaction requires
|
353
353
|
# `spanner.databases.beginOrRollbackReadWriteTransaction` permission
|
354
354
|
# on the `session` resource.
|
355
|
+
#
|
356
|
+
# Note: The following fields are mutually exclusive: `read_write`, `partitioned_dml`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
355
357
|
# @!attribute [rw] partitioned_dml
|
356
358
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml]
|
357
359
|
# Partitioned DML transaction.
|
@@ -359,6 +361,8 @@ module Google
|
|
359
361
|
# Authorization to begin a Partitioned DML transaction requires
|
360
362
|
# `spanner.databases.beginPartitionedDmlTransaction` permission
|
361
363
|
# on the `session` resource.
|
364
|
+
#
|
365
|
+
# Note: The following fields are mutually exclusive: `partitioned_dml`, `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
362
366
|
# @!attribute [rw] read_only
|
363
367
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly]
|
364
368
|
# Transaction will not write.
|
@@ -366,6 +370,8 @@ module Google
|
|
366
370
|
# Authorization to begin a read-only transaction requires
|
367
371
|
# `spanner.databases.beginReadOnlyTransaction` permission
|
368
372
|
# on the `session` resource.
|
373
|
+
#
|
374
|
+
# Note: The following fields are mutually exclusive: `read_only`, `read_write`, `partitioned_dml`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
369
375
|
# @!attribute [rw] exclude_txn_from_change_streams
|
370
376
|
# @return [::Boolean]
|
371
377
|
# When `exclude_txn_from_change_streams` is set to `true`:
|
@@ -382,6 +388,9 @@ module Google
|
|
382
388
|
# `exclude_txn_from_change_streams` may only be specified for read-write or
|
383
389
|
# partitioned-dml transactions, otherwise the API will return an
|
384
390
|
# `INVALID_ARGUMENT` error.
|
391
|
+
# @!attribute [rw] isolation_level
|
392
|
+
# @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel]
|
393
|
+
# Isolation level for the transaction.
|
385
394
|
class TransactionOptions
|
386
395
|
include ::Google::Protobuf::MessageExts
|
387
396
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -407,12 +416,23 @@ module Google
|
|
407
416
|
module ReadLockMode
|
408
417
|
# Default value.
|
409
418
|
#
|
410
|
-
# If
|
419
|
+
# * If isolation level is `REPEATABLE_READ`, then it is an error to
|
420
|
+
# specify `read_lock_mode`. Locking semantics default to `OPTIMISTIC`.
|
421
|
+
# No validation checks are done for reads, except for:
|
422
|
+
# 1. reads done as part of queries that use `SELECT FOR UPDATE`
|
423
|
+
# 2. reads done as part of statements with a `LOCK_SCANNED_RANGES`
|
424
|
+
# hint
|
425
|
+
# 3. reads done as part of DML statements
|
426
|
+
# to validate that the data that was served at the snapshot time is
|
427
|
+
# unchanged at commit time.
|
428
|
+
# * At all other isolation levels, if `read_lock_mode` is the default
|
429
|
+
# value, then pessimistic read lock is used.
|
411
430
|
READ_LOCK_MODE_UNSPECIFIED = 0
|
412
431
|
|
413
432
|
# Pessimistic lock mode.
|
414
433
|
#
|
415
434
|
# Read locks are acquired immediately on read.
|
435
|
+
# Semantics described only applies to `SERIALIZABLE` isolation.
|
416
436
|
PESSIMISTIC = 1
|
417
437
|
|
418
438
|
# Optimistic lock mode.
|
@@ -420,6 +440,7 @@ module Google
|
|
420
440
|
# Locks for reads within the transaction are not acquired on read.
|
421
441
|
# Instead the locks are acquired on a commit to validate that
|
422
442
|
# read/queried data has not changed since the transaction started.
|
443
|
+
# Semantics described only applies to `SERIALIZABLE` isolation.
|
423
444
|
OPTIMISTIC = 2
|
424
445
|
end
|
425
446
|
end
|
@@ -435,6 +456,8 @@ module Google
|
|
435
456
|
# @return [::Boolean]
|
436
457
|
# Read at a timestamp where all previously committed transactions
|
437
458
|
# are visible.
|
459
|
+
#
|
460
|
+
# Note: The following fields are mutually exclusive: `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
438
461
|
# @!attribute [rw] min_read_timestamp
|
439
462
|
# @return [::Google::Protobuf::Timestamp]
|
440
463
|
# Executes all reads at a timestamp >= `min_read_timestamp`.
|
@@ -447,6 +470,8 @@ module Google
|
|
447
470
|
#
|
448
471
|
# A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
|
449
472
|
# Example: `"2014-10-02T15:01:23.045123456Z"`.
|
473
|
+
#
|
474
|
+
# Note: The following fields are mutually exclusive: `min_read_timestamp`, `strong`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
450
475
|
# @!attribute [rw] max_staleness
|
451
476
|
# @return [::Google::Protobuf::Duration]
|
452
477
|
# Read data at a timestamp >= `NOW - max_staleness`
|
@@ -462,6 +487,8 @@ module Google
|
|
462
487
|
#
|
463
488
|
# Note that this option can only be used in single-use
|
464
489
|
# transactions.
|
490
|
+
#
|
491
|
+
# Note: The following fields are mutually exclusive: `max_staleness`, `strong`, `min_read_timestamp`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
465
492
|
# @!attribute [rw] read_timestamp
|
466
493
|
# @return [::Google::Protobuf::Timestamp]
|
467
494
|
# Executes all reads at the given timestamp. Unlike other modes,
|
@@ -476,6 +503,8 @@ module Google
|
|
476
503
|
#
|
477
504
|
# A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
|
478
505
|
# Example: `"2014-10-02T15:01:23.045123456Z"`.
|
506
|
+
#
|
507
|
+
# Note: The following fields are mutually exclusive: `read_timestamp`, `strong`, `min_read_timestamp`, `max_staleness`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
479
508
|
# @!attribute [rw] exact_staleness
|
480
509
|
# @return [::Google::Protobuf::Duration]
|
481
510
|
# Executes all reads at a timestamp that is `exact_staleness`
|
@@ -489,6 +518,8 @@ module Google
|
|
489
518
|
#
|
490
519
|
# Useful for reading at nearby replicas without the distributed
|
491
520
|
# timestamp negotiation overhead of `max_staleness`.
|
521
|
+
#
|
522
|
+
# Note: The following fields are mutually exclusive: `exact_staleness`, `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
492
523
|
# @!attribute [rw] return_read_timestamp
|
493
524
|
# @return [::Boolean]
|
494
525
|
# If true, the Cloud Spanner-selected read timestamp is included in
|
@@ -498,6 +529,38 @@ module Google
|
|
498
529
|
include ::Google::Protobuf::MessageExts
|
499
530
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
500
531
|
end
|
532
|
+
|
533
|
+
# `IsolationLevel` is used when setting `isolation_level` for a transaction.
|
534
|
+
module IsolationLevel
|
535
|
+
# Default value.
|
536
|
+
#
|
537
|
+
# If the value is not specified, the `SERIALIZABLE` isolation level is
|
538
|
+
# used.
|
539
|
+
ISOLATION_LEVEL_UNSPECIFIED = 0
|
540
|
+
|
541
|
+
# All transactions appear as if they executed in a serial order, even if
|
542
|
+
# some of the reads, writes, and other operations of distinct transactions
|
543
|
+
# actually occurred in parallel. Spanner assigns commit timestamps that
|
544
|
+
# reflect the order of committed transactions to implement this property.
|
545
|
+
# Spanner offers a stronger guarantee than serializability called external
|
546
|
+
# consistency. For further details, please refer to
|
547
|
+
# https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability.
|
548
|
+
SERIALIZABLE = 1
|
549
|
+
|
550
|
+
# All reads performed during the transaction observe a consistent snapshot
|
551
|
+
# of the database, and the transaction will only successfully commit in the
|
552
|
+
# absence of conflicts between its updates and any concurrent updates that
|
553
|
+
# have occurred since that snapshot. Consequently, in contrast to
|
554
|
+
# `SERIALIZABLE` transactions, only write-write conflicts are detected in
|
555
|
+
# snapshot transactions.
|
556
|
+
#
|
557
|
+
# This isolation level does not support Read-only and Partitioned DML
|
558
|
+
# transactions.
|
559
|
+
#
|
560
|
+
# When `REPEATABLE_READ` is specified on a read-write transaction, the
|
561
|
+
# locking semantics default to `OPTIMISTIC`.
|
562
|
+
REPEATABLE_READ = 2
|
563
|
+
end
|
501
564
|
end
|
502
565
|
|
503
566
|
# A transaction.
|
@@ -546,15 +609,21 @@ module Google
|
|
546
609
|
# Execute the read or SQL query in a temporary transaction.
|
547
610
|
# This is the most efficient way to execute a transaction that
|
548
611
|
# consists of a single SQL query.
|
612
|
+
#
|
613
|
+
# Note: The following fields are mutually exclusive: `single_use`, `id`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
549
614
|
# @!attribute [rw] id
|
550
615
|
# @return [::String]
|
551
616
|
# Execute the read or SQL query in a previously-started transaction.
|
617
|
+
#
|
618
|
+
# Note: The following fields are mutually exclusive: `id`, `single_use`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
552
619
|
# @!attribute [rw] begin
|
553
620
|
# @return [::Google::Cloud::Spanner::V1::TransactionOptions]
|
554
621
|
# Begin a new transaction and execute this read or SQL query in
|
555
622
|
# it. The transaction ID of the new transaction is returned in
|
556
623
|
# {::Google::Cloud::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata.transaction},
|
557
624
|
# which is a {::Google::Cloud::Spanner::V1::Transaction Transaction}.
|
625
|
+
#
|
626
|
+
# Note: The following fields are mutually exclusive: `begin`, `single_use`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
558
627
|
class TransactionSelector
|
559
628
|
include ::Google::Protobuf::MessageExts
|
560
629
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-25 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -96,7 +95,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
96
95
|
licenses:
|
97
96
|
- Apache-2.0
|
98
97
|
metadata: {}
|
99
|
-
post_install_message:
|
100
98
|
rdoc_options: []
|
101
99
|
require_paths:
|
102
100
|
- lib
|
@@ -104,15 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
102
|
requirements:
|
105
103
|
- - ">="
|
106
104
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
105
|
+
version: '3.0'
|
108
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
107
|
requirements:
|
110
108
|
- - ">="
|
111
109
|
- !ruby/object:Gem::Version
|
112
110
|
version: '0'
|
113
111
|
requirements: []
|
114
|
-
rubygems_version: 3.5
|
115
|
-
signing_key:
|
112
|
+
rubygems_version: 3.6.5
|
116
113
|
specification_version: 4
|
117
114
|
summary: Cloud Spanner is a managed, mission-critical, globally consistent and scalable
|
118
115
|
relational database service.
|