1// Copyright 2021 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// http://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// Code generated by protoc-gen-go. DO NOT EDIT. 16// versions: 17// protoc-gen-go v1.25.0-devel 18// protoc v3.13.0 19// source: google/spanner/v1/transaction.proto 20 21package spanner 22 23import ( 24 reflect "reflect" 25 sync "sync" 26 27 proto "github.com/golang/protobuf/proto" 28 _ "google.golang.org/genproto/googleapis/api/annotations" 29 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 30 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 31 durationpb "google.golang.org/protobuf/types/known/durationpb" 32 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 33) 34 35const ( 36 // Verify that this generated code is sufficiently up-to-date. 37 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 // Verify that runtime/protoimpl is sufficiently up-to-date. 39 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40) 41 42// This is a compile-time assertion that a sufficiently up-to-date version 43// of the legacy proto package is being used. 44const _ = proto.ProtoPackageIsVersion4 45 46// # Transactions 47// 48// 49// Each session can have at most one active transaction at a time (note that 50// standalone reads and queries use a transaction internally and do count 51// towards the one transaction limit). After the active transaction is 52// completed, the session can immediately be re-used for the next transaction. 53// It is not necessary to create a new session for each transaction. 54// 55// # Transaction Modes 56// 57// Cloud Spanner supports three transaction modes: 58// 59// 1. Locking read-write. This type of transaction is the only way 60// to write data into Cloud Spanner. These transactions rely on 61// pessimistic locking and, if necessary, two-phase commit. 62// Locking read-write transactions may abort, requiring the 63// application to retry. 64// 65// 2. Snapshot read-only. This transaction type provides guaranteed 66// consistency across several reads, but does not allow 67// writes. Snapshot read-only transactions can be configured to 68// read at timestamps in the past. Snapshot read-only 69// transactions do not need to be committed. 70// 71// 3. Partitioned DML. This type of transaction is used to execute 72// a single Partitioned DML statement. Partitioned DML partitions 73// the key space and runs the DML statement over each partition 74// in parallel using separate, internal transactions that commit 75// independently. Partitioned DML transactions do not need to be 76// committed. 77// 78// For transactions that only read, snapshot read-only transactions 79// provide simpler semantics and are almost always faster. In 80// particular, read-only transactions do not take locks, so they do 81// not conflict with read-write transactions. As a consequence of not 82// taking locks, they also do not abort, so retry loops are not needed. 83// 84// Transactions may only read/write data in a single database. They 85// may, however, read/write data in different tables within that 86// database. 87// 88// ## Locking Read-Write Transactions 89// 90// Locking transactions may be used to atomically read-modify-write 91// data anywhere in a database. This type of transaction is externally 92// consistent. 93// 94// Clients should attempt to minimize the amount of time a transaction 95// is active. Faster transactions commit with higher probability 96// and cause less contention. Cloud Spanner attempts to keep read locks 97// active as long as the transaction continues to do reads, and the 98// transaction has not been terminated by 99// [Commit][google.spanner.v1.Spanner.Commit] or 100// [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of 101// inactivity at the client may cause Cloud Spanner to release a 102// transaction's locks and abort it. 103// 104// Conceptually, a read-write transaction consists of zero or more 105// reads or SQL statements followed by 106// [Commit][google.spanner.v1.Spanner.Commit]. At any time before 107// [Commit][google.spanner.v1.Spanner.Commit], the client can send a 108// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the 109// transaction. 110// 111// ## Semantics 112// 113// Cloud Spanner can commit the transaction if all read locks it acquired 114// are still valid at commit time, and it is able to acquire write 115// locks for all writes. Cloud Spanner can abort the transaction for any 116// reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees 117// that the transaction has not modified any user data in Cloud Spanner. 118// 119// Unless the transaction commits, Cloud Spanner makes no guarantees about 120// how long the transaction's locks were held for. It is an error to 121// use Cloud Spanner locks for any sort of mutual exclusion other than 122// between Cloud Spanner transactions themselves. 123// 124// ## Retrying Aborted Transactions 125// 126// When a transaction aborts, the application can choose to retry the 127// whole transaction again. To maximize the chances of successfully 128// committing the retry, the client should execute the retry in the 129// same session as the original attempt. The original session's lock 130// priority increases with each consecutive abort, meaning that each 131// attempt has a slightly better chance of success than the previous. 132// 133// Under some circumstances (e.g., many transactions attempting to 134// modify the same row(s)), a transaction can abort many times in a 135// short period before successfully committing. Thus, it is not a good 136// idea to cap the number of retries a transaction can attempt; 137// instead, it is better to limit the total amount of wall time spent 138// retrying. 139// 140// ## Idle Transactions 141// 142// A transaction is considered idle if it has no outstanding reads or 143// SQL queries and has not started a read or SQL query within the last 10 144// seconds. Idle transactions can be aborted by Cloud Spanner so that they 145// don't hold on to locks indefinitely. In that case, the commit will 146// fail with error `ABORTED`. 147// 148// If this behavior is undesirable, periodically executing a simple 149// SQL query in the transaction (e.g., `SELECT 1`) prevents the 150// transaction from becoming idle. 151// 152// ## Snapshot Read-Only Transactions 153// 154// Snapshot read-only transactions provides a simpler method than 155// locking read-write transactions for doing several consistent 156// reads. However, this type of transaction does not support writes. 157// 158// Snapshot transactions do not take locks. Instead, they work by 159// choosing a Cloud Spanner timestamp, then executing all reads at that 160// timestamp. Since they do not acquire locks, they do not block 161// concurrent read-write transactions. 162// 163// Unlike locking read-write transactions, snapshot read-only 164// transactions never abort. They can fail if the chosen read 165// timestamp is garbage collected; however, the default garbage 166// collection policy is generous enough that most applications do not 167// need to worry about this in practice. 168// 169// Snapshot read-only transactions do not need to call 170// [Commit][google.spanner.v1.Spanner.Commit] or 171// [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not 172// permitted to do so). 173// 174// To execute a snapshot transaction, the client specifies a timestamp 175// bound, which tells Cloud Spanner how to choose a read timestamp. 176// 177// The types of timestamp bound are: 178// 179// - Strong (the default). 180// - Bounded staleness. 181// - Exact staleness. 182// 183// If the Cloud Spanner database to be read is geographically distributed, 184// stale read-only transactions can execute more quickly than strong 185// or read-write transaction, because they are able to execute far 186// from the leader replica. 187// 188// Each type of timestamp bound is discussed in detail below. 189// 190// ## Strong 191// 192// Strong reads are guaranteed to see the effects of all transactions 193// that have committed before the start of the read. Furthermore, all 194// rows yielded by a single read are consistent with each other -- if 195// any part of the read observes a transaction, all parts of the read 196// see the transaction. 197// 198// Strong reads are not repeatable: two consecutive strong read-only 199// transactions might return inconsistent results if there are 200// concurrent writes. If consistency across reads is required, the 201// reads should be executed within a transaction or at an exact read 202// timestamp. 203// 204// See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]. 205// 206// ## Exact Staleness 207// 208// These timestamp bounds execute reads at a user-specified 209// timestamp. Reads at a timestamp are guaranteed to see a consistent 210// prefix of the global transaction history: they observe 211// modifications done by all transactions with a commit timestamp <= 212// the read timestamp, and observe none of the modifications done by 213// transactions with a larger commit timestamp. They will block until 214// all conflicting transactions that may be assigned commit timestamps 215// <= the read timestamp have finished. 216// 217// The timestamp can either be expressed as an absolute Cloud Spanner commit 218// timestamp or a staleness relative to the current time. 219// 220// These modes do not require a "negotiation phase" to pick a 221// timestamp. As a result, they execute slightly faster than the 222// equivalent boundedly stale concurrency modes. On the other hand, 223// boundedly stale reads usually return fresher results. 224// 225// See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and 226// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness]. 227// 228// ## Bounded Staleness 229// 230// Bounded staleness modes allow Cloud Spanner to pick the read timestamp, 231// subject to a user-provided staleness bound. Cloud Spanner chooses the 232// newest timestamp within the staleness bound that allows execution 233// of the reads at the closest available replica without blocking. 234// 235// All rows yielded are consistent with each other -- if any part of 236// the read observes a transaction, all parts of the read see the 237// transaction. Boundedly stale reads are not repeatable: two stale 238// reads, even if they use the same staleness bound, can execute at 239// different timestamps and thus return inconsistent results. 240// 241// Boundedly stale reads execute in two phases: the first phase 242// negotiates a timestamp among all replicas needed to serve the 243// read. In the second phase, reads are executed at the negotiated 244// timestamp. 245// 246// As a result of the two phase execution, bounded staleness reads are 247// usually a little slower than comparable exact staleness 248// reads. However, they are typically able to return fresher 249// results, and are more likely to execute at the closest replica. 250// 251// Because the timestamp negotiation requires up-front knowledge of 252// which rows will be read, it can only be used with single-use 253// read-only transactions. 254// 255// See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and 256// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp]. 257// 258// ## Old Read Timestamps and Garbage Collection 259// 260// Cloud Spanner continuously garbage collects deleted and overwritten data 261// in the background to reclaim storage space. This process is known 262// as "version GC". By default, version GC reclaims versions after they 263// are one hour old. Because of this, Cloud Spanner cannot perform reads 264// at read timestamps more than one hour in the past. This 265// restriction also applies to in-progress reads and/or SQL queries whose 266// timestamp become too old while executing. Reads and SQL queries with 267// too-old read timestamps fail with the error `FAILED_PRECONDITION`. 268// 269// ## Partitioned DML Transactions 270// 271// Partitioned DML transactions are used to execute DML statements with a 272// different execution strategy that provides different, and often better, 273// scalability properties for large, table-wide operations than DML in a 274// ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, 275// should prefer using ReadWrite transactions. 276// 277// Partitioned DML partitions the keyspace and runs the DML statement on each 278// partition in separate, internal transactions. These transactions commit 279// automatically when complete, and run independently from one another. 280// 281// To reduce lock contention, this execution strategy only acquires read locks 282// on rows that match the WHERE clause of the statement. Additionally, the 283// smaller per-partition transactions hold locks for less time. 284// 285// That said, Partitioned DML is not a drop-in replacement for standard DML used 286// in ReadWrite transactions. 287// 288// - The DML statement must be fully-partitionable. Specifically, the statement 289// must be expressible as the union of many statements which each access only 290// a single row of the table. 291// 292// - The statement is not applied atomically to all rows of the table. Rather, 293// the statement is applied atomically to partitions of the table, in 294// independent transactions. Secondary index rows are updated atomically 295// with the base table rows. 296// 297// - Partitioned DML does not guarantee exactly-once execution semantics 298// against a partition. The statement will be applied at least once to each 299// partition. It is strongly recommended that the DML statement should be 300// idempotent to avoid unexpected results. For instance, it is potentially 301// dangerous to run a statement such as 302// `UPDATE table SET column = column + 1` as it could be run multiple times 303// against some rows. 304// 305// - The partitions are committed automatically - there is no support for 306// Commit or Rollback. If the call returns an error, or if the client issuing 307// the ExecuteSql call dies, it is possible that some rows had the statement 308// executed on them successfully. It is also possible that statement was 309// never executed against other rows. 310// 311// - Partitioned DML transactions may only contain the execution of a single 312// DML statement via ExecuteSql or ExecuteStreamingSql. 313// 314// - If any error is encountered during the execution of the partitioned DML 315// operation (for instance, a UNIQUE INDEX violation, division by zero, or a 316// value that cannot be stored due to schema constraints), then the 317// operation is stopped at that point and an error is returned. It is 318// possible that at this point, some partitions have been committed (or even 319// committed multiple times), and other partitions have not been run at all. 320// 321// Given the above, Partitioned DML is good fit for large, database-wide, 322// operations that are idempotent, such as deleting old rows from a very large 323// table. 324type TransactionOptions struct { 325 state protoimpl.MessageState 326 sizeCache protoimpl.SizeCache 327 unknownFields protoimpl.UnknownFields 328 329 // Required. The type of transaction. 330 // 331 // Types that are assignable to Mode: 332 // *TransactionOptions_ReadWrite_ 333 // *TransactionOptions_PartitionedDml_ 334 // *TransactionOptions_ReadOnly_ 335 Mode isTransactionOptions_Mode `protobuf_oneof:"mode"` 336} 337 338func (x *TransactionOptions) Reset() { 339 *x = TransactionOptions{} 340 if protoimpl.UnsafeEnabled { 341 mi := &file_google_spanner_v1_transaction_proto_msgTypes[0] 342 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 343 ms.StoreMessageInfo(mi) 344 } 345} 346 347func (x *TransactionOptions) String() string { 348 return protoimpl.X.MessageStringOf(x) 349} 350 351func (*TransactionOptions) ProtoMessage() {} 352 353func (x *TransactionOptions) ProtoReflect() protoreflect.Message { 354 mi := &file_google_spanner_v1_transaction_proto_msgTypes[0] 355 if protoimpl.UnsafeEnabled && x != nil { 356 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 357 if ms.LoadMessageInfo() == nil { 358 ms.StoreMessageInfo(mi) 359 } 360 return ms 361 } 362 return mi.MessageOf(x) 363} 364 365// Deprecated: Use TransactionOptions.ProtoReflect.Descriptor instead. 366func (*TransactionOptions) Descriptor() ([]byte, []int) { 367 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{0} 368} 369 370func (m *TransactionOptions) GetMode() isTransactionOptions_Mode { 371 if m != nil { 372 return m.Mode 373 } 374 return nil 375} 376 377func (x *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWrite { 378 if x, ok := x.GetMode().(*TransactionOptions_ReadWrite_); ok { 379 return x.ReadWrite 380 } 381 return nil 382} 383 384func (x *TransactionOptions) GetPartitionedDml() *TransactionOptions_PartitionedDml { 385 if x, ok := x.GetMode().(*TransactionOptions_PartitionedDml_); ok { 386 return x.PartitionedDml 387 } 388 return nil 389} 390 391func (x *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnly { 392 if x, ok := x.GetMode().(*TransactionOptions_ReadOnly_); ok { 393 return x.ReadOnly 394 } 395 return nil 396} 397 398type isTransactionOptions_Mode interface { 399 isTransactionOptions_Mode() 400} 401 402type TransactionOptions_ReadWrite_ struct { 403 // Transaction may write. 404 // 405 // Authorization to begin a read-write transaction requires 406 // `spanner.databases.beginOrRollbackReadWriteTransaction` permission 407 // on the `session` resource. 408 ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,1,opt,name=read_write,json=readWrite,proto3,oneof"` 409} 410 411type TransactionOptions_PartitionedDml_ struct { 412 // Partitioned DML transaction. 413 // 414 // Authorization to begin a Partitioned DML transaction requires 415 // `spanner.databases.beginPartitionedDmlTransaction` permission 416 // on the `session` resource. 417 PartitionedDml *TransactionOptions_PartitionedDml `protobuf:"bytes,3,opt,name=partitioned_dml,json=partitionedDml,proto3,oneof"` 418} 419 420type TransactionOptions_ReadOnly_ struct { 421 // Transaction will not write. 422 // 423 // Authorization to begin a read-only transaction requires 424 // `spanner.databases.beginReadOnlyTransaction` permission 425 // on the `session` resource. 426 ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,proto3,oneof"` 427} 428 429func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {} 430 431func (*TransactionOptions_PartitionedDml_) isTransactionOptions_Mode() {} 432 433func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {} 434 435// A transaction. 436type Transaction struct { 437 state protoimpl.MessageState 438 sizeCache protoimpl.SizeCache 439 unknownFields protoimpl.UnknownFields 440 441 // `id` may be used to identify the transaction in subsequent 442 // [Read][google.spanner.v1.Spanner.Read], 443 // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], 444 // [Commit][google.spanner.v1.Spanner.Commit], or 445 // [Rollback][google.spanner.v1.Spanner.Rollback] calls. 446 // 447 // Single-use read-only transactions do not have IDs, because 448 // single-use transactions do not support multiple requests. 449 Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 450 // For snapshot read-only transactions, the read timestamp chosen 451 // for the transaction. Not returned by default: see 452 // [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp]. 453 // 454 // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. 455 // Example: `"2014-10-02T15:01:23.045123456Z"`. 456 ReadTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=read_timestamp,json=readTimestamp,proto3" json:"read_timestamp,omitempty"` 457} 458 459func (x *Transaction) Reset() { 460 *x = Transaction{} 461 if protoimpl.UnsafeEnabled { 462 mi := &file_google_spanner_v1_transaction_proto_msgTypes[1] 463 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 464 ms.StoreMessageInfo(mi) 465 } 466} 467 468func (x *Transaction) String() string { 469 return protoimpl.X.MessageStringOf(x) 470} 471 472func (*Transaction) ProtoMessage() {} 473 474func (x *Transaction) ProtoReflect() protoreflect.Message { 475 mi := &file_google_spanner_v1_transaction_proto_msgTypes[1] 476 if protoimpl.UnsafeEnabled && x != nil { 477 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 478 if ms.LoadMessageInfo() == nil { 479 ms.StoreMessageInfo(mi) 480 } 481 return ms 482 } 483 return mi.MessageOf(x) 484} 485 486// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. 487func (*Transaction) Descriptor() ([]byte, []int) { 488 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{1} 489} 490 491func (x *Transaction) GetId() []byte { 492 if x != nil { 493 return x.Id 494 } 495 return nil 496} 497 498func (x *Transaction) GetReadTimestamp() *timestamppb.Timestamp { 499 if x != nil { 500 return x.ReadTimestamp 501 } 502 return nil 503} 504 505// This message is used to select the transaction in which a 506// [Read][google.spanner.v1.Spanner.Read] or 507// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs. 508// 509// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions. 510type TransactionSelector struct { 511 state protoimpl.MessageState 512 sizeCache protoimpl.SizeCache 513 unknownFields protoimpl.UnknownFields 514 515 // If no fields are set, the default is a single use transaction 516 // with strong concurrency. 517 // 518 // Types that are assignable to Selector: 519 // *TransactionSelector_SingleUse 520 // *TransactionSelector_Id 521 // *TransactionSelector_Begin 522 Selector isTransactionSelector_Selector `protobuf_oneof:"selector"` 523} 524 525func (x *TransactionSelector) Reset() { 526 *x = TransactionSelector{} 527 if protoimpl.UnsafeEnabled { 528 mi := &file_google_spanner_v1_transaction_proto_msgTypes[2] 529 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 530 ms.StoreMessageInfo(mi) 531 } 532} 533 534func (x *TransactionSelector) String() string { 535 return protoimpl.X.MessageStringOf(x) 536} 537 538func (*TransactionSelector) ProtoMessage() {} 539 540func (x *TransactionSelector) ProtoReflect() protoreflect.Message { 541 mi := &file_google_spanner_v1_transaction_proto_msgTypes[2] 542 if protoimpl.UnsafeEnabled && x != nil { 543 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 544 if ms.LoadMessageInfo() == nil { 545 ms.StoreMessageInfo(mi) 546 } 547 return ms 548 } 549 return mi.MessageOf(x) 550} 551 552// Deprecated: Use TransactionSelector.ProtoReflect.Descriptor instead. 553func (*TransactionSelector) Descriptor() ([]byte, []int) { 554 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{2} 555} 556 557func (m *TransactionSelector) GetSelector() isTransactionSelector_Selector { 558 if m != nil { 559 return m.Selector 560 } 561 return nil 562} 563 564func (x *TransactionSelector) GetSingleUse() *TransactionOptions { 565 if x, ok := x.GetSelector().(*TransactionSelector_SingleUse); ok { 566 return x.SingleUse 567 } 568 return nil 569} 570 571func (x *TransactionSelector) GetId() []byte { 572 if x, ok := x.GetSelector().(*TransactionSelector_Id); ok { 573 return x.Id 574 } 575 return nil 576} 577 578func (x *TransactionSelector) GetBegin() *TransactionOptions { 579 if x, ok := x.GetSelector().(*TransactionSelector_Begin); ok { 580 return x.Begin 581 } 582 return nil 583} 584 585type isTransactionSelector_Selector interface { 586 isTransactionSelector_Selector() 587} 588 589type TransactionSelector_SingleUse struct { 590 // Execute the read or SQL query in a temporary transaction. 591 // This is the most efficient way to execute a transaction that 592 // consists of a single SQL query. 593 SingleUse *TransactionOptions `protobuf:"bytes,1,opt,name=single_use,json=singleUse,proto3,oneof"` 594} 595 596type TransactionSelector_Id struct { 597 // Execute the read or SQL query in a previously-started transaction. 598 Id []byte `protobuf:"bytes,2,opt,name=id,proto3,oneof"` 599} 600 601type TransactionSelector_Begin struct { 602 // Begin a new transaction and execute this read or SQL query in 603 // it. The transaction ID of the new transaction is returned in 604 // [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction], which is a [Transaction][google.spanner.v1.Transaction]. 605 Begin *TransactionOptions `protobuf:"bytes,3,opt,name=begin,proto3,oneof"` 606} 607 608func (*TransactionSelector_SingleUse) isTransactionSelector_Selector() {} 609 610func (*TransactionSelector_Id) isTransactionSelector_Selector() {} 611 612func (*TransactionSelector_Begin) isTransactionSelector_Selector() {} 613 614// Message type to initiate a read-write transaction. Currently this 615// transaction type has no options. 616type TransactionOptions_ReadWrite struct { 617 state protoimpl.MessageState 618 sizeCache protoimpl.SizeCache 619 unknownFields protoimpl.UnknownFields 620} 621 622func (x *TransactionOptions_ReadWrite) Reset() { 623 *x = TransactionOptions_ReadWrite{} 624 if protoimpl.UnsafeEnabled { 625 mi := &file_google_spanner_v1_transaction_proto_msgTypes[3] 626 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 627 ms.StoreMessageInfo(mi) 628 } 629} 630 631func (x *TransactionOptions_ReadWrite) String() string { 632 return protoimpl.X.MessageStringOf(x) 633} 634 635func (*TransactionOptions_ReadWrite) ProtoMessage() {} 636 637func (x *TransactionOptions_ReadWrite) ProtoReflect() protoreflect.Message { 638 mi := &file_google_spanner_v1_transaction_proto_msgTypes[3] 639 if protoimpl.UnsafeEnabled && x != nil { 640 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 641 if ms.LoadMessageInfo() == nil { 642 ms.StoreMessageInfo(mi) 643 } 644 return ms 645 } 646 return mi.MessageOf(x) 647} 648 649// Deprecated: Use TransactionOptions_ReadWrite.ProtoReflect.Descriptor instead. 650func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int) { 651 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{0, 0} 652} 653 654// Message type to initiate a Partitioned DML transaction. 655type TransactionOptions_PartitionedDml struct { 656 state protoimpl.MessageState 657 sizeCache protoimpl.SizeCache 658 unknownFields protoimpl.UnknownFields 659} 660 661func (x *TransactionOptions_PartitionedDml) Reset() { 662 *x = TransactionOptions_PartitionedDml{} 663 if protoimpl.UnsafeEnabled { 664 mi := &file_google_spanner_v1_transaction_proto_msgTypes[4] 665 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 666 ms.StoreMessageInfo(mi) 667 } 668} 669 670func (x *TransactionOptions_PartitionedDml) String() string { 671 return protoimpl.X.MessageStringOf(x) 672} 673 674func (*TransactionOptions_PartitionedDml) ProtoMessage() {} 675 676func (x *TransactionOptions_PartitionedDml) ProtoReflect() protoreflect.Message { 677 mi := &file_google_spanner_v1_transaction_proto_msgTypes[4] 678 if protoimpl.UnsafeEnabled && x != nil { 679 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 680 if ms.LoadMessageInfo() == nil { 681 ms.StoreMessageInfo(mi) 682 } 683 return ms 684 } 685 return mi.MessageOf(x) 686} 687 688// Deprecated: Use TransactionOptions_PartitionedDml.ProtoReflect.Descriptor instead. 689func (*TransactionOptions_PartitionedDml) Descriptor() ([]byte, []int) { 690 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{0, 1} 691} 692 693// Message type to initiate a read-only transaction. 694type TransactionOptions_ReadOnly struct { 695 state protoimpl.MessageState 696 sizeCache protoimpl.SizeCache 697 unknownFields protoimpl.UnknownFields 698 699 // How to choose the timestamp for the read-only transaction. 700 // 701 // Types that are assignable to TimestampBound: 702 // *TransactionOptions_ReadOnly_Strong 703 // *TransactionOptions_ReadOnly_MinReadTimestamp 704 // *TransactionOptions_ReadOnly_MaxStaleness 705 // *TransactionOptions_ReadOnly_ReadTimestamp 706 // *TransactionOptions_ReadOnly_ExactStaleness 707 TimestampBound isTransactionOptions_ReadOnly_TimestampBound `protobuf_oneof:"timestamp_bound"` 708 // If true, the Cloud Spanner-selected read timestamp is included in 709 // the [Transaction][google.spanner.v1.Transaction] message that describes the transaction. 710 ReturnReadTimestamp bool `protobuf:"varint,6,opt,name=return_read_timestamp,json=returnReadTimestamp,proto3" json:"return_read_timestamp,omitempty"` 711} 712 713func (x *TransactionOptions_ReadOnly) Reset() { 714 *x = TransactionOptions_ReadOnly{} 715 if protoimpl.UnsafeEnabled { 716 mi := &file_google_spanner_v1_transaction_proto_msgTypes[5] 717 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 718 ms.StoreMessageInfo(mi) 719 } 720} 721 722func (x *TransactionOptions_ReadOnly) String() string { 723 return protoimpl.X.MessageStringOf(x) 724} 725 726func (*TransactionOptions_ReadOnly) ProtoMessage() {} 727 728func (x *TransactionOptions_ReadOnly) ProtoReflect() protoreflect.Message { 729 mi := &file_google_spanner_v1_transaction_proto_msgTypes[5] 730 if protoimpl.UnsafeEnabled && x != nil { 731 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 732 if ms.LoadMessageInfo() == nil { 733 ms.StoreMessageInfo(mi) 734 } 735 return ms 736 } 737 return mi.MessageOf(x) 738} 739 740// Deprecated: Use TransactionOptions_ReadOnly.ProtoReflect.Descriptor instead. 741func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int) { 742 return file_google_spanner_v1_transaction_proto_rawDescGZIP(), []int{0, 2} 743} 744 745func (m *TransactionOptions_ReadOnly) GetTimestampBound() isTransactionOptions_ReadOnly_TimestampBound { 746 if m != nil { 747 return m.TimestampBound 748 } 749 return nil 750} 751 752func (x *TransactionOptions_ReadOnly) GetStrong() bool { 753 if x, ok := x.GetTimestampBound().(*TransactionOptions_ReadOnly_Strong); ok { 754 return x.Strong 755 } 756 return false 757} 758 759func (x *TransactionOptions_ReadOnly) GetMinReadTimestamp() *timestamppb.Timestamp { 760 if x, ok := x.GetTimestampBound().(*TransactionOptions_ReadOnly_MinReadTimestamp); ok { 761 return x.MinReadTimestamp 762 } 763 return nil 764} 765 766func (x *TransactionOptions_ReadOnly) GetMaxStaleness() *durationpb.Duration { 767 if x, ok := x.GetTimestampBound().(*TransactionOptions_ReadOnly_MaxStaleness); ok { 768 return x.MaxStaleness 769 } 770 return nil 771} 772 773func (x *TransactionOptions_ReadOnly) GetReadTimestamp() *timestamppb.Timestamp { 774 if x, ok := x.GetTimestampBound().(*TransactionOptions_ReadOnly_ReadTimestamp); ok { 775 return x.ReadTimestamp 776 } 777 return nil 778} 779 780func (x *TransactionOptions_ReadOnly) GetExactStaleness() *durationpb.Duration { 781 if x, ok := x.GetTimestampBound().(*TransactionOptions_ReadOnly_ExactStaleness); ok { 782 return x.ExactStaleness 783 } 784 return nil 785} 786 787func (x *TransactionOptions_ReadOnly) GetReturnReadTimestamp() bool { 788 if x != nil { 789 return x.ReturnReadTimestamp 790 } 791 return false 792} 793 794type isTransactionOptions_ReadOnly_TimestampBound interface { 795 isTransactionOptions_ReadOnly_TimestampBound() 796} 797 798type TransactionOptions_ReadOnly_Strong struct { 799 // Read at a timestamp where all previously committed transactions 800 // are visible. 801 Strong bool `protobuf:"varint,1,opt,name=strong,proto3,oneof"` 802} 803 804type TransactionOptions_ReadOnly_MinReadTimestamp struct { 805 // Executes all reads at a timestamp >= `min_read_timestamp`. 806 // 807 // This is useful for requesting fresher data than some previous 808 // read, or data that is fresh enough to observe the effects of some 809 // previously committed transaction whose timestamp is known. 810 // 811 // Note that this option can only be used in single-use transactions. 812 // 813 // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. 814 // Example: `"2014-10-02T15:01:23.045123456Z"`. 815 MinReadTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=min_read_timestamp,json=minReadTimestamp,proto3,oneof"` 816} 817 818type TransactionOptions_ReadOnly_MaxStaleness struct { 819 // Read data at a timestamp >= `NOW - max_staleness` 820 // seconds. Guarantees that all writes that have committed more 821 // than the specified number of seconds ago are visible. Because 822 // Cloud Spanner chooses the exact timestamp, this mode works even if 823 // the client's local clock is substantially skewed from Cloud Spanner 824 // commit timestamps. 825 // 826 // Useful for reading the freshest data available at a nearby 827 // replica, while bounding the possible staleness if the local 828 // replica has fallen behind. 829 // 830 // Note that this option can only be used in single-use 831 // transactions. 832 MaxStaleness *durationpb.Duration `protobuf:"bytes,3,opt,name=max_staleness,json=maxStaleness,proto3,oneof"` 833} 834 835type TransactionOptions_ReadOnly_ReadTimestamp struct { 836 // Executes all reads at the given timestamp. Unlike other modes, 837 // reads at a specific timestamp are repeatable; the same read at 838 // the same timestamp always returns the same data. If the 839 // timestamp is in the future, the read will block until the 840 // specified timestamp, modulo the read's deadline. 841 // 842 // Useful for large scale consistent reads such as mapreduces, or 843 // for coordinating many reads against a consistent snapshot of the 844 // data. 845 // 846 // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. 847 // Example: `"2014-10-02T15:01:23.045123456Z"`. 848 ReadTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=read_timestamp,json=readTimestamp,proto3,oneof"` 849} 850 851type TransactionOptions_ReadOnly_ExactStaleness struct { 852 // Executes all reads at a timestamp that is `exact_staleness` 853 // old. The timestamp is chosen soon after the read is started. 854 // 855 // Guarantees that all writes that have committed more than the 856 // specified number of seconds ago are visible. Because Cloud Spanner 857 // chooses the exact timestamp, this mode works even if the client's 858 // local clock is substantially skewed from Cloud Spanner commit 859 // timestamps. 860 // 861 // Useful for reading at nearby replicas without the distributed 862 // timestamp negotiation overhead of `max_staleness`. 863 ExactStaleness *durationpb.Duration `protobuf:"bytes,5,opt,name=exact_staleness,json=exactStaleness,proto3,oneof"` 864} 865 866func (*TransactionOptions_ReadOnly_Strong) isTransactionOptions_ReadOnly_TimestampBound() {} 867 868func (*TransactionOptions_ReadOnly_MinReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {} 869 870func (*TransactionOptions_ReadOnly_MaxStaleness) isTransactionOptions_ReadOnly_TimestampBound() {} 871 872func (*TransactionOptions_ReadOnly_ReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {} 873 874func (*TransactionOptions_ReadOnly_ExactStaleness) isTransactionOptions_ReadOnly_TimestampBound() {} 875 876var File_google_spanner_v1_transaction_proto protoreflect.FileDescriptor 877 878var file_google_spanner_v1_transaction_proto_rawDesc = []byte{ 879 0x0a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 880 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 881 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 882 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 883 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 884 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 885 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 886 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 887 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 888 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x05, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 889 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 890 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 891 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 892 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 893 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 894 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 895 0x12, 0x5f, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 896 0x64, 0x6d, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 897 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 898 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 899 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x44, 0x6d, 0x6c, 0x48, 900 0x00, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x44, 0x6d, 901 0x6c, 0x12, 0x4d, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 902 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 903 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 904 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 905 0x4f, 0x6e, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 906 0x1a, 0x0b, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x1a, 0x10, 0x0a, 907 0x0e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x44, 0x6d, 0x6c, 0x1a, 908 0x84, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x06, 909 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 910 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x12, 0x4a, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 911 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 912 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 913 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 914 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 915 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x6e, 916 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 917 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 918 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x6c, 0x65, 919 0x6e, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 920 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 921 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 922 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 923 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x0f, 0x65, 0x78, 0x61, 924 0x63, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 925 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 926 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 927 0x0e, 0x65, 0x78, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x12, 928 0x32, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 929 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 930 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 931 0x61, 0x6d, 0x70, 0x42, 0x11, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 932 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x60, 933 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 934 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 935 0x0e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 936 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 937 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 938 0x70, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 939 0x22, 0xba, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 940 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x67, 941 0x6c, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 942 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 943 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 944 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x09, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, 0x73, 0x65, 945 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 946 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 947 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 948 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 949 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 950 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xb6, 0x01, 951 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 952 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 953 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 954 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 955 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 956 0x69, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x70, 957 0x61, 0x6e, 0x6e, 0x65, 0x72, 0xaa, 0x02, 0x17, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 958 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 959 0x02, 0x17, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x53, 960 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 961 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x53, 0x70, 0x61, 0x6e, 0x6e, 962 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 963} 964 965var ( 966 file_google_spanner_v1_transaction_proto_rawDescOnce sync.Once 967 file_google_spanner_v1_transaction_proto_rawDescData = file_google_spanner_v1_transaction_proto_rawDesc 968) 969 970func file_google_spanner_v1_transaction_proto_rawDescGZIP() []byte { 971 file_google_spanner_v1_transaction_proto_rawDescOnce.Do(func() { 972 file_google_spanner_v1_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_spanner_v1_transaction_proto_rawDescData) 973 }) 974 return file_google_spanner_v1_transaction_proto_rawDescData 975} 976 977var file_google_spanner_v1_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 6) 978var file_google_spanner_v1_transaction_proto_goTypes = []interface{}{ 979 (*TransactionOptions)(nil), // 0: google.spanner.v1.TransactionOptions 980 (*Transaction)(nil), // 1: google.spanner.v1.Transaction 981 (*TransactionSelector)(nil), // 2: google.spanner.v1.TransactionSelector 982 (*TransactionOptions_ReadWrite)(nil), // 3: google.spanner.v1.TransactionOptions.ReadWrite 983 (*TransactionOptions_PartitionedDml)(nil), // 4: google.spanner.v1.TransactionOptions.PartitionedDml 984 (*TransactionOptions_ReadOnly)(nil), // 5: google.spanner.v1.TransactionOptions.ReadOnly 985 (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp 986 (*durationpb.Duration)(nil), // 7: google.protobuf.Duration 987} 988var file_google_spanner_v1_transaction_proto_depIdxs = []int32{ 989 3, // 0: google.spanner.v1.TransactionOptions.read_write:type_name -> google.spanner.v1.TransactionOptions.ReadWrite 990 4, // 1: google.spanner.v1.TransactionOptions.partitioned_dml:type_name -> google.spanner.v1.TransactionOptions.PartitionedDml 991 5, // 2: google.spanner.v1.TransactionOptions.read_only:type_name -> google.spanner.v1.TransactionOptions.ReadOnly 992 6, // 3: google.spanner.v1.Transaction.read_timestamp:type_name -> google.protobuf.Timestamp 993 0, // 4: google.spanner.v1.TransactionSelector.single_use:type_name -> google.spanner.v1.TransactionOptions 994 0, // 5: google.spanner.v1.TransactionSelector.begin:type_name -> google.spanner.v1.TransactionOptions 995 6, // 6: google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp:type_name -> google.protobuf.Timestamp 996 7, // 7: google.spanner.v1.TransactionOptions.ReadOnly.max_staleness:type_name -> google.protobuf.Duration 997 6, // 8: google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp:type_name -> google.protobuf.Timestamp 998 7, // 9: google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness:type_name -> google.protobuf.Duration 999 10, // [10:10] is the sub-list for method output_type 1000 10, // [10:10] is the sub-list for method input_type 1001 10, // [10:10] is the sub-list for extension type_name 1002 10, // [10:10] is the sub-list for extension extendee 1003 0, // [0:10] is the sub-list for field type_name 1004} 1005 1006func init() { file_google_spanner_v1_transaction_proto_init() } 1007func file_google_spanner_v1_transaction_proto_init() { 1008 if File_google_spanner_v1_transaction_proto != nil { 1009 return 1010 } 1011 if !protoimpl.UnsafeEnabled { 1012 file_google_spanner_v1_transaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 1013 switch v := v.(*TransactionOptions); i { 1014 case 0: 1015 return &v.state 1016 case 1: 1017 return &v.sizeCache 1018 case 2: 1019 return &v.unknownFields 1020 default: 1021 return nil 1022 } 1023 } 1024 file_google_spanner_v1_transaction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 1025 switch v := v.(*Transaction); i { 1026 case 0: 1027 return &v.state 1028 case 1: 1029 return &v.sizeCache 1030 case 2: 1031 return &v.unknownFields 1032 default: 1033 return nil 1034 } 1035 } 1036 file_google_spanner_v1_transaction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 1037 switch v := v.(*TransactionSelector); i { 1038 case 0: 1039 return &v.state 1040 case 1: 1041 return &v.sizeCache 1042 case 2: 1043 return &v.unknownFields 1044 default: 1045 return nil 1046 } 1047 } 1048 file_google_spanner_v1_transaction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 1049 switch v := v.(*TransactionOptions_ReadWrite); i { 1050 case 0: 1051 return &v.state 1052 case 1: 1053 return &v.sizeCache 1054 case 2: 1055 return &v.unknownFields 1056 default: 1057 return nil 1058 } 1059 } 1060 file_google_spanner_v1_transaction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 1061 switch v := v.(*TransactionOptions_PartitionedDml); i { 1062 case 0: 1063 return &v.state 1064 case 1: 1065 return &v.sizeCache 1066 case 2: 1067 return &v.unknownFields 1068 default: 1069 return nil 1070 } 1071 } 1072 file_google_spanner_v1_transaction_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 1073 switch v := v.(*TransactionOptions_ReadOnly); i { 1074 case 0: 1075 return &v.state 1076 case 1: 1077 return &v.sizeCache 1078 case 2: 1079 return &v.unknownFields 1080 default: 1081 return nil 1082 } 1083 } 1084 } 1085 file_google_spanner_v1_transaction_proto_msgTypes[0].OneofWrappers = []interface{}{ 1086 (*TransactionOptions_ReadWrite_)(nil), 1087 (*TransactionOptions_PartitionedDml_)(nil), 1088 (*TransactionOptions_ReadOnly_)(nil), 1089 } 1090 file_google_spanner_v1_transaction_proto_msgTypes[2].OneofWrappers = []interface{}{ 1091 (*TransactionSelector_SingleUse)(nil), 1092 (*TransactionSelector_Id)(nil), 1093 (*TransactionSelector_Begin)(nil), 1094 } 1095 file_google_spanner_v1_transaction_proto_msgTypes[5].OneofWrappers = []interface{}{ 1096 (*TransactionOptions_ReadOnly_Strong)(nil), 1097 (*TransactionOptions_ReadOnly_MinReadTimestamp)(nil), 1098 (*TransactionOptions_ReadOnly_MaxStaleness)(nil), 1099 (*TransactionOptions_ReadOnly_ReadTimestamp)(nil), 1100 (*TransactionOptions_ReadOnly_ExactStaleness)(nil), 1101 } 1102 type x struct{} 1103 out := protoimpl.TypeBuilder{ 1104 File: protoimpl.DescBuilder{ 1105 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1106 RawDescriptor: file_google_spanner_v1_transaction_proto_rawDesc, 1107 NumEnums: 0, 1108 NumMessages: 6, 1109 NumExtensions: 0, 1110 NumServices: 0, 1111 }, 1112 GoTypes: file_google_spanner_v1_transaction_proto_goTypes, 1113 DependencyIndexes: file_google_spanner_v1_transaction_proto_depIdxs, 1114 MessageInfos: file_google_spanner_v1_transaction_proto_msgTypes, 1115 }.Build() 1116 File_google_spanner_v1_transaction_proto = out.File 1117 file_google_spanner_v1_transaction_proto_rawDesc = nil 1118 file_google_spanner_v1_transaction_proto_goTypes = nil 1119 file_google_spanner_v1_transaction_proto_depIdxs = nil 1120} 1121