vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,441 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/keys.proto
/*
Package spanner is a generated protocol buffer package.
It is generated from these files:
google/spanner/v1/keys.proto
google/spanner/v1/mutation.proto
google/spanner/v1/query_plan.proto
google/spanner/v1/result_set.proto
google/spanner/v1/spanner.proto
google/spanner/v1/transaction.proto
google/spanner/v1/type.proto
It has these top-level messages:
KeyRange
KeySet
Mutation
PlanNode
QueryPlan
ResultSet
PartialResultSet
ResultSetMetadata
ResultSetStats
CreateSessionRequest
Session
GetSessionRequest
ListSessionsRequest
ListSessionsResponse
DeleteSessionRequest
ExecuteSqlRequest
ReadRequest
BeginTransactionRequest
CommitRequest
CommitResponse
RollbackRequest
TransactionOptions
Transaction
TransactionSelector
Type
StructType
*/
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// KeyRange represents a range of rows in a table or index.
//
// A range has a start key and an end key. These keys can be open or
// closed, indicating if the range includes rows with that key.
//
// Keys are represented by lists, where the ith value in the list
// corresponds to the ith component of the table or index primary key.
// Individual values are encoded as described [here][google.spanner.v1.TypeCode].
//
// For example, consider the following table definition:
//
// CREATE TABLE UserEvents (
// UserName STRING(MAX),
// EventDate STRING(10)
// ) PRIMARY KEY(UserName, EventDate);
//
// The following keys name rows in this table:
//
// ["Bob", "2014-09-23"]
// ["Alfred", "2015-06-12"]
//
// Since the `UserEvents` table's `PRIMARY KEY` clause names two
// columns, each `UserEvents` key has two elements; the first is the
// `UserName`, and the second is the `EventDate`.
//
// Key ranges with multiple components are interpreted
// lexicographically by component using the table or index key's declared
// sort order. For example, the following range returns all events for
// user `"Bob"` that occurred in the year 2015:
//
// "start_closed": ["Bob", "2015-01-01"]
// "end_closed": ["Bob", "2015-12-31"]
//
// Start and end keys can omit trailing key components. This affects the
// inclusion and exclusion of rows that exactly match the provided key
// components: if the key is closed, then rows that exactly match the
// provided components are included; if the key is open, then rows
// that exactly match are not included.
//
// For example, the following range includes all events for `"Bob"` that
// occurred during and after the year 2000:
//
// "start_closed": ["Bob", "2000-01-01"]
// "end_closed": ["Bob"]
//
// The next example retrieves all events for `"Bob"`:
//
// "start_closed": ["Bob"]
// "end_closed": ["Bob"]
//
// To retrieve events before the year 2000:
//
// "start_closed": ["Bob"]
// "end_open": ["Bob", "2000-01-01"]
//
// The following range includes all rows in the table:
//
// "start_closed": []
// "end_closed": []
//
// This range returns all users whose `UserName` begins with any
// character from A to C:
//
// "start_closed": ["A"]
// "end_open": ["D"]
//
// This range returns all users whose `UserName` begins with B:
//
// "start_closed": ["B"]
// "end_open": ["C"]
//
// Key ranges honor column sort order. For example, suppose a table is
// defined as follows:
//
// CREATE TABLE DescendingSortedTable {
// Key INT64,
// ...
// ) PRIMARY KEY(Key DESC);
//
// The following range retrieves all rows with key values between 1
// and 100 inclusive:
//
// "start_closed": ["100"]
// "end_closed": ["1"]
//
// Note that 100 is passed as the start, and 1 is passed as the end,
// because `Key` is a descending column in the schema.
type KeyRange struct {
// The start key must be provided. It can be either closed or open.
//
// Types that are valid to be assigned to StartKeyType:
// *KeyRange_StartClosed
// *KeyRange_StartOpen
StartKeyType isKeyRange_StartKeyType `protobuf_oneof:"start_key_type"`
// The end key must be provided. It can be either closed or open.
//
// Types that are valid to be assigned to EndKeyType:
// *KeyRange_EndClosed
// *KeyRange_EndOpen
EndKeyType isKeyRange_EndKeyType `protobuf_oneof:"end_key_type"`
}
func (m *KeyRange) Reset() { *m = KeyRange{} }
func (m *KeyRange) String() string { return proto.CompactTextString(m) }
func (*KeyRange) ProtoMessage() {}
func (*KeyRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isKeyRange_StartKeyType interface {
isKeyRange_StartKeyType()
}
type isKeyRange_EndKeyType interface {
isKeyRange_EndKeyType()
}
type KeyRange_StartClosed struct {
StartClosed *google_protobuf1.ListValue `protobuf:"bytes,1,opt,name=start_closed,json=startClosed,oneof"`
}
type KeyRange_StartOpen struct {
StartOpen *google_protobuf1.ListValue `protobuf:"bytes,2,opt,name=start_open,json=startOpen,oneof"`
}
type KeyRange_EndClosed struct {
EndClosed *google_protobuf1.ListValue `protobuf:"bytes,3,opt,name=end_closed,json=endClosed,oneof"`
}
type KeyRange_EndOpen struct {
EndOpen *google_protobuf1.ListValue `protobuf:"bytes,4,opt,name=end_open,json=endOpen,oneof"`
}
func (*KeyRange_StartClosed) isKeyRange_StartKeyType() {}
func (*KeyRange_StartOpen) isKeyRange_StartKeyType() {}
func (*KeyRange_EndClosed) isKeyRange_EndKeyType() {}
func (*KeyRange_EndOpen) isKeyRange_EndKeyType() {}
func (m *KeyRange) GetStartKeyType() isKeyRange_StartKeyType {
if m != nil {
return m.StartKeyType
}
return nil
}
func (m *KeyRange) GetEndKeyType() isKeyRange_EndKeyType {
if m != nil {
return m.EndKeyType
}
return nil
}
func (m *KeyRange) GetStartClosed() *google_protobuf1.ListValue {
if x, ok := m.GetStartKeyType().(*KeyRange_StartClosed); ok {
return x.StartClosed
}
return nil
}
func (m *KeyRange) GetStartOpen() *google_protobuf1.ListValue {
if x, ok := m.GetStartKeyType().(*KeyRange_StartOpen); ok {
return x.StartOpen
}
return nil
}
func (m *KeyRange) GetEndClosed() *google_protobuf1.ListValue {
if x, ok := m.GetEndKeyType().(*KeyRange_EndClosed); ok {
return x.EndClosed
}
return nil
}
func (m *KeyRange) GetEndOpen() *google_protobuf1.ListValue {
if x, ok := m.GetEndKeyType().(*KeyRange_EndOpen); ok {
return x.EndOpen
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*KeyRange) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _KeyRange_OneofMarshaler, _KeyRange_OneofUnmarshaler, _KeyRange_OneofSizer, []interface{}{
(*KeyRange_StartClosed)(nil),
(*KeyRange_StartOpen)(nil),
(*KeyRange_EndClosed)(nil),
(*KeyRange_EndOpen)(nil),
}
}
func _KeyRange_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*KeyRange)
// start_key_type
switch x := m.StartKeyType.(type) {
case *KeyRange_StartClosed:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.StartClosed); err != nil {
return err
}
case *KeyRange_StartOpen:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.StartOpen); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("KeyRange.StartKeyType has unexpected type %T", x)
}
// end_key_type
switch x := m.EndKeyType.(type) {
case *KeyRange_EndClosed:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EndClosed); err != nil {
return err
}
case *KeyRange_EndOpen:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EndOpen); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("KeyRange.EndKeyType has unexpected type %T", x)
}
return nil
}
func _KeyRange_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*KeyRange)
switch tag {
case 1: // start_key_type.start_closed
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.ListValue)
err := b.DecodeMessage(msg)
m.StartKeyType = &KeyRange_StartClosed{msg}
return true, err
case 2: // start_key_type.start_open
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.ListValue)
err := b.DecodeMessage(msg)
m.StartKeyType = &KeyRange_StartOpen{msg}
return true, err
case 3: // end_key_type.end_closed
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.ListValue)
err := b.DecodeMessage(msg)
m.EndKeyType = &KeyRange_EndClosed{msg}
return true, err
case 4: // end_key_type.end_open
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.ListValue)
err := b.DecodeMessage(msg)
m.EndKeyType = &KeyRange_EndOpen{msg}
return true, err
default:
return false, nil
}
}
func _KeyRange_OneofSizer(msg proto.Message) (n int) {
m := msg.(*KeyRange)
// start_key_type
switch x := m.StartKeyType.(type) {
case *KeyRange_StartClosed:
s := proto.Size(x.StartClosed)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *KeyRange_StartOpen:
s := proto.Size(x.StartOpen)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
// end_key_type
switch x := m.EndKeyType.(type) {
case *KeyRange_EndClosed:
s := proto.Size(x.EndClosed)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *KeyRange_EndOpen:
s := proto.Size(x.EndOpen)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
// the keys are expected to be in the same table or index. The keys need
// not be sorted in any particular way.
//
// If the same key is specified multiple times in the set (for example
// if two ranges, two keys, or a key and a range overlap), Cloud Spanner
// behaves as if the key were only specified once.
type KeySet struct {
// A list of specific keys. Entries in `keys` should have exactly as
// many elements as there are columns in the primary or index key
// with which this `KeySet` is used. Individual key values are
// encoded as described [here][google.spanner.v1.TypeCode].
Keys []*google_protobuf1.ListValue `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
// A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
// key range specifications.
Ranges []*KeyRange `protobuf:"bytes,2,rep,name=ranges" json:"ranges,omitempty"`
// For convenience `all` can be set to `true` to indicate that this
// `KeySet` matches all keys in the table or index. Note that any keys
// specified in `keys` or `ranges` are only yielded once.
All bool `protobuf:"varint,3,opt,name=all" json:"all,omitempty"`
}
func (m *KeySet) Reset() { *m = KeySet{} }
func (m *KeySet) String() string { return proto.CompactTextString(m) }
func (*KeySet) ProtoMessage() {}
func (*KeySet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *KeySet) GetKeys() []*google_protobuf1.ListValue {
if m != nil {
return m.Keys
}
return nil
}
func (m *KeySet) GetRanges() []*KeyRange {
if m != nil {
return m.Ranges
}
return nil
}
func (m *KeySet) GetAll() bool {
if m != nil {
return m.All
}
return false
}
func init() {
proto.RegisterType((*KeyRange)(nil), "google.spanner.v1.KeyRange")
proto.RegisterType((*KeySet)(nil), "google.spanner.v1.KeySet")
}
func init() { proto.RegisterFile("google/spanner/v1/keys.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 371 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6b, 0xea, 0x30,
0x1c, 0xc7, 0x5f, 0xab, 0xf8, 0x34, 0x8a, 0xf8, 0x0a, 0x8f, 0x57, 0x7c, 0x3b, 0x88, 0xa7, 0x9d,
0x52, 0x3a, 0x0f, 0x1b, 0x78, 0x18, 0xd4, 0xc3, 0x06, 0x0e, 0x26, 0x15, 0x3c, 0x0c, 0x41, 0xa2,
0xfd, 0xad, 0x14, 0xb3, 0x24, 0x34, 0xa9, 0xd0, 0xd3, 0xfe, 0x87, 0xfd, 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0x82, 0xf2, 0x30, 0x6a, 0xea, 0x97, 0xf0, 0x9d, 0x51, 0xe3, 0xfb,
0x82, 0xd8, 0xcc, 0x79, 0x13, 0xd4, 0xca, 0xf5, 0xc5, 0x4a, 0xdf, 0x35, 0xc6, 0x7f, 0x7c, 0xf4,
0x78, 0xb8, 0xbe, 0xfc, 0xd8, 0x8e, 0x7a, 0x03, 0xd4, 0x20, 0x94, 0x9a, 0xef, 0x6f, 0xc7, 0x7a,
0x19, 0xbd, 0x38, 0xe8, 0xef, 0x8e, 0x3f, 0x1d, 0xcb, 0x51, 0x67, 0x0e, 0xa5, 0x5c, 0xe8, 0xfa,
0x85, 0xf3, 0x70, 0x65, 0x79, 0xca, 0x29, 0x61, 0x29, 0xe6, 0x79, 0x1a, 0xa4, 0xc0, 0xcc, 0xe1,
0x82, 0x0a, 0x11, 0x91, 0xc9, 0x2f, 0xbf, 0xd5, 0xd4, 0x2e, 0xdf, 0xdc, 0x7f, 0x37, 0x95, 0x3a,
0xa3, 0xbc, 0x48, 0xf0, 0xd2, 0x16, 0xac, 0xc2, 0xf7, 0x9a, 0xac, 0x0d, 0x59, 0x5b, 0xb2, 0x5e,
0x85, 0xdb, 0x96, 0x09, 0x9e, 0x7c, 0x04, 0x00, 0x00, 0xff, 0xff, 0x27, 0x88, 0xea, 0x11, 0xae,
0x02, 0x00, 0x00,
}

View File

@ -0,0 +1,347 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/mutation.proto
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A modification to one or more Cloud Spanner rows. Mutations can be
// applied to a Cloud Spanner database by sending them in a
// [Commit][google.spanner.v1.Spanner.Commit] call.
type Mutation struct {
// Required. The operation to perform.
//
// Types that are valid to be assigned to Operation:
// *Mutation_Insert
// *Mutation_Update
// *Mutation_InsertOrUpdate
// *Mutation_Replace
// *Mutation_Delete_
Operation isMutation_Operation `protobuf_oneof:"operation"`
}
func (m *Mutation) Reset() { *m = Mutation{} }
func (m *Mutation) String() string { return proto.CompactTextString(m) }
func (*Mutation) ProtoMessage() {}
func (*Mutation) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
type isMutation_Operation interface {
isMutation_Operation()
}
type Mutation_Insert struct {
Insert *Mutation_Write `protobuf:"bytes,1,opt,name=insert,oneof"`
}
type Mutation_Update struct {
Update *Mutation_Write `protobuf:"bytes,2,opt,name=update,oneof"`
}
type Mutation_InsertOrUpdate struct {
InsertOrUpdate *Mutation_Write `protobuf:"bytes,3,opt,name=insert_or_update,json=insertOrUpdate,oneof"`
}
type Mutation_Replace struct {
Replace *Mutation_Write `protobuf:"bytes,4,opt,name=replace,oneof"`
}
type Mutation_Delete_ struct {
Delete *Mutation_Delete `protobuf:"bytes,5,opt,name=delete,oneof"`
}
func (*Mutation_Insert) isMutation_Operation() {}
func (*Mutation_Update) isMutation_Operation() {}
func (*Mutation_InsertOrUpdate) isMutation_Operation() {}
func (*Mutation_Replace) isMutation_Operation() {}
func (*Mutation_Delete_) isMutation_Operation() {}
func (m *Mutation) GetOperation() isMutation_Operation {
if m != nil {
return m.Operation
}
return nil
}
func (m *Mutation) GetInsert() *Mutation_Write {
if x, ok := m.GetOperation().(*Mutation_Insert); ok {
return x.Insert
}
return nil
}
func (m *Mutation) GetUpdate() *Mutation_Write {
if x, ok := m.GetOperation().(*Mutation_Update); ok {
return x.Update
}
return nil
}
func (m *Mutation) GetInsertOrUpdate() *Mutation_Write {
if x, ok := m.GetOperation().(*Mutation_InsertOrUpdate); ok {
return x.InsertOrUpdate
}
return nil
}
func (m *Mutation) GetReplace() *Mutation_Write {
if x, ok := m.GetOperation().(*Mutation_Replace); ok {
return x.Replace
}
return nil
}
func (m *Mutation) GetDelete() *Mutation_Delete {
if x, ok := m.GetOperation().(*Mutation_Delete_); ok {
return x.Delete
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Mutation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Mutation_OneofMarshaler, _Mutation_OneofUnmarshaler, _Mutation_OneofSizer, []interface{}{
(*Mutation_Insert)(nil),
(*Mutation_Update)(nil),
(*Mutation_InsertOrUpdate)(nil),
(*Mutation_Replace)(nil),
(*Mutation_Delete_)(nil),
}
}
func _Mutation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Mutation)
// operation
switch x := m.Operation.(type) {
case *Mutation_Insert:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Insert); err != nil {
return err
}
case *Mutation_Update:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Update); err != nil {
return err
}
case *Mutation_InsertOrUpdate:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.InsertOrUpdate); err != nil {
return err
}
case *Mutation_Replace:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Replace); err != nil {
return err
}
case *Mutation_Delete_:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Delete); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Mutation.Operation has unexpected type %T", x)
}
return nil
}
func _Mutation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Mutation)
switch tag {
case 1: // operation.insert
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Mutation_Write)
err := b.DecodeMessage(msg)
m.Operation = &Mutation_Insert{msg}
return true, err
case 2: // operation.update
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Mutation_Write)
err := b.DecodeMessage(msg)
m.Operation = &Mutation_Update{msg}
return true, err
case 3: // operation.insert_or_update
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Mutation_Write)
err := b.DecodeMessage(msg)
m.Operation = &Mutation_InsertOrUpdate{msg}
return true, err
case 4: // operation.replace
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Mutation_Write)
err := b.DecodeMessage(msg)
m.Operation = &Mutation_Replace{msg}
return true, err
case 5: // operation.delete
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Mutation_Delete)
err := b.DecodeMessage(msg)
m.Operation = &Mutation_Delete_{msg}
return true, err
default:
return false, nil
}
}
func _Mutation_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Mutation)
// operation
switch x := m.Operation.(type) {
case *Mutation_Insert:
s := proto.Size(x.Insert)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Mutation_Update:
s := proto.Size(x.Update)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Mutation_InsertOrUpdate:
s := proto.Size(x.InsertOrUpdate)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Mutation_Replace:
s := proto.Size(x.Replace)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Mutation_Delete_:
s := proto.Size(x.Delete)
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
// [replace][google.spanner.v1.Mutation.replace] operations.
type Mutation_Write struct {
// Required. The table whose rows will be written.
Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
// The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written.
//
// The list of columns must contain enough columns to allow
// Cloud Spanner to derive values for all primary key columns in the
// row(s) to be modified.
Columns []string `protobuf:"bytes,2,rep,name=columns" json:"columns,omitempty"`
// The values to be written. `values` can contain more than one
// list of values. If it does, then multiple rows are written, one
// for each entry in `values`. Each list in `values` must have
// exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns]
// above. Sending multiple lists is equivalent to sending multiple
// `Mutation`s, each containing one `values` entry and repeating
// [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are
// encoded as described [here][google.spanner.v1.TypeCode].
Values []*google_protobuf1.ListValue `protobuf:"bytes,3,rep,name=values" json:"values,omitempty"`
}
func (m *Mutation_Write) Reset() { *m = Mutation_Write{} }
func (m *Mutation_Write) String() string { return proto.CompactTextString(m) }
func (*Mutation_Write) ProtoMessage() {}
func (*Mutation_Write) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
func (m *Mutation_Write) GetTable() string {
if m != nil {
return m.Table
}
return ""
}
func (m *Mutation_Write) GetColumns() []string {
if m != nil {
return m.Columns
}
return nil
}
func (m *Mutation_Write) GetValues() []*google_protobuf1.ListValue {
if m != nil {
return m.Values
}
return nil
}
// Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
type Mutation_Delete struct {
// Required. The table whose rows will be deleted.
Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
// Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete.
KeySet *KeySet `protobuf:"bytes,2,opt,name=key_set,json=keySet" json:"key_set,omitempty"`
}
func (m *Mutation_Delete) Reset() { *m = Mutation_Delete{} }
func (m *Mutation_Delete) String() string { return proto.CompactTextString(m) }
func (*Mutation_Delete) ProtoMessage() {}
func (*Mutation_Delete) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 1} }
func (m *Mutation_Delete) GetTable() string {
if m != nil {
return m.Table
}
return ""
}
func (m *Mutation_Delete) GetKeySet() *KeySet {
if m != nil {
return m.KeySet
}
return nil
}
func init() {
proto.RegisterType((*Mutation)(nil), "google.spanner.v1.Mutation")
proto.RegisterType((*Mutation_Write)(nil), "google.spanner.v1.Mutation.Write")
proto.RegisterType((*Mutation_Delete)(nil), "google.spanner.v1.Mutation.Delete")
}
func init() { proto.RegisterFile("google/spanner/v1/mutation.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 413 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xd1, 0xea, 0xd3, 0x30,
0x14, 0xc6, 0xed, 0xba, 0x75, 0x2e, 0x43, 0xd1, 0xa2, 0x58, 0x8b, 0x17, 0x75, 0x57, 0xbb, 0x4a,
0x69, 0xbd, 0x11, 0xa6, 0x37, 0x53, 0x50, 0xd0, 0xe1, 0xe8, 0x70, 0x82, 0x0c, 0x46, 0xd6, 0x1d,
0x4b, 0x69, 0x96, 0x94, 0x24, 0x1d, 0xec, 0x45, 0xbc, 0xf4, 0x01, 0x7c, 0x14, 0x9f, 0x4a, 0x9a,
0xa4, 0x32, 0x9c, 0xfe, 0xd9, 0xff, 0xaa, 0x3d, 0x7c, 0xdf, 0xef, 0x3b, 0xe7, 0x24, 0x41, 0x51,
0xc1, 0x79, 0x41, 0x21, 0x96, 0x35, 0x61, 0x0c, 0x44, 0x7c, 0x4c, 0xe2, 0x43, 0xa3, 0x88, 0x2a,
0x39, 0xc3, 0xb5, 0xe0, 0x8a, 0xfb, 0x0f, 0x8d, 0x03, 0x5b, 0x07, 0x3e, 0x26, 0xe1, 0x33, 0x0b,
0x91, 0xba, 0x8c, 0x09, 0x63, 0xdc, 0xf8, 0xa5, 0x01, 0xfe, 0xa8, 0xba, 0xda, 0x35, 0xdf, 0x62,
0xa9, 0x44, 0x93, 0xab, 0xbf, 0xd4, 0xb3, 0x86, 0x15, 0x9c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0x78, 0x0d, 0x42, 0xaf, 0x37, 0xff, 0xee, 0xa0, 0xc7, 0x39, 0x3f, 0x5c,
0x52, 0xf3, 0x7b, 0xdd, 0x11, 0x2c, 0xdb, 0xf1, 0x96, 0xce, 0xd7, 0x97, 0xd6, 0x53, 0x70, 0x4a,
0x58, 0x81, 0xb9, 0x28, 0xe2, 0x02, 0x98, 0x1e, 0x3e, 0x36, 0x12, 0xa9, 0x4b, 0x79, 0xf6, 0x10,
0x67, 0xf6, 0xf7, 0x67, 0xef, 0xc9, 0x3b, 0x83, 0xbe, 0xa1, 0xbc, 0xd9, 0xe3, 0x95, 0x6d, 0xb2,
0x4e, 0x7e, 0x75, 0xca, 0x46, 0x2b, 0x1b, 0xab, 0x6c, 0xd6, 0xc9, 0xce, 0xd3, 0xc1, 0x2f, 0x7e,
0x07, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x69, 0x1c, 0xbc, 0x51, 0x03, 0x00, 0x00,
}

View File

@ -0,0 +1,286 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/query_plan.proto
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between the two different kinds of
// nodes that can appear in a query plan.
type PlanNode_Kind int32
const (
// Not specified.
PlanNode_KIND_UNSPECIFIED PlanNode_Kind = 0
// Denotes a Relational operator node in the expression tree. Relational
// operators represent iterative processing of rows during query execution.
// For example, a `TableScan` operation that reads rows from a table.
PlanNode_RELATIONAL PlanNode_Kind = 1
// Denotes a Scalar node in the expression tree. Scalar nodes represent
// non-iterable entities in the query plan. For example, constants or
// arithmetic operators appearing inside predicate expressions or references
// to column names.
PlanNode_SCALAR PlanNode_Kind = 2
)
var PlanNode_Kind_name = map[int32]string{
0: "KIND_UNSPECIFIED",
1: "RELATIONAL",
2: "SCALAR",
}
var PlanNode_Kind_value = map[string]int32{
"KIND_UNSPECIFIED": 0,
"RELATIONAL": 1,
"SCALAR": 2,
}
func (x PlanNode_Kind) String() string {
return proto.EnumName(PlanNode_Kind_name, int32(x))
}
func (PlanNode_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
// Node information for nodes appearing in a [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes].
type PlanNode struct {
// The `PlanNode`'s index in [node list][google.spanner.v1.QueryPlan.plan_nodes].
Index int32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
// Used to determine the type of node. May be needed for visualizing
// different kinds of nodes differently. For example, If the node is a
// [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a condensed representation
// which can be used to directly embed a description of the node in its
// parent.
Kind PlanNode_Kind `protobuf:"varint,2,opt,name=kind,enum=google.spanner.v1.PlanNode_Kind" json:"kind,omitempty"`
// The display name for the node.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
// List of child node `index`es and their relationship to this parent.
ChildLinks []*PlanNode_ChildLink `protobuf:"bytes,4,rep,name=child_links,json=childLinks" json:"child_links,omitempty"`
// Condensed representation for [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes.
ShortRepresentation *PlanNode_ShortRepresentation `protobuf:"bytes,5,opt,name=short_representation,json=shortRepresentation" json:"short_representation,omitempty"`
// Attributes relevant to the node contained in a group of key-value pairs.
// For example, a Parameter Reference node could have the following
// information in its metadata:
//
// {
// "parameter_reference": "param1",
// "parameter_type": "array"
// }
Metadata *google_protobuf1.Struct `protobuf:"bytes,6,opt,name=metadata" json:"metadata,omitempty"`
// The execution statistics associated with the node, contained in a group of
// key-value pairs. Only present if the plan was returned as a result of a
// profile query. For example, number of executions, number of rows/time per
// execution etc.
ExecutionStats *google_protobuf1.Struct `protobuf:"bytes,7,opt,name=execution_stats,json=executionStats" json:"execution_stats,omitempty"`
}
func (m *PlanNode) Reset() { *m = PlanNode{} }
func (m *PlanNode) String() string { return proto.CompactTextString(m) }
func (*PlanNode) ProtoMessage() {}
func (*PlanNode) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *PlanNode) GetIndex() int32 {
if m != nil {
return m.Index
}
return 0
}
func (m *PlanNode) GetKind() PlanNode_Kind {
if m != nil {
return m.Kind
}
return PlanNode_KIND_UNSPECIFIED
}
func (m *PlanNode) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *PlanNode) GetChildLinks() []*PlanNode_ChildLink {
if m != nil {
return m.ChildLinks
}
return nil
}
func (m *PlanNode) GetShortRepresentation() *PlanNode_ShortRepresentation {
if m != nil {
return m.ShortRepresentation
}
return nil
}
func (m *PlanNode) GetMetadata() *google_protobuf1.Struct {
if m != nil {
return m.Metadata
}
return nil
}
func (m *PlanNode) GetExecutionStats() *google_protobuf1.Struct {
if m != nil {
return m.ExecutionStats
}
return nil
}
// Metadata associated with a parent-child relationship appearing in a
// [PlanNode][google.spanner.v1.PlanNode].
type PlanNode_ChildLink struct {
// The node to which the link points.
ChildIndex int32 `protobuf:"varint,1,opt,name=child_index,json=childIndex" json:"child_index,omitempty"`
// The type of the link. For example, in Hash Joins this could be used to
// distinguish between the build child and the probe child, or in the case
// of the child being an output variable, to represent the tag associated
// with the output variable.
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
// Only present if the child node is [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds
// to an output variable of the parent node. The field carries the name of
// the output variable.
// For example, a `TableScan` operator that reads rows from a table will
// have child links to the `SCALAR` nodes representing the output variables
// created for each column that is read by the operator. The corresponding
// `variable` fields will be set to the variable names assigned to the
// columns.
Variable string `protobuf:"bytes,3,opt,name=variable" json:"variable,omitempty"`
}
func (m *PlanNode_ChildLink) Reset() { *m = PlanNode_ChildLink{} }
func (m *PlanNode_ChildLink) String() string { return proto.CompactTextString(m) }
func (*PlanNode_ChildLink) ProtoMessage() {}
func (*PlanNode_ChildLink) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} }
func (m *PlanNode_ChildLink) GetChildIndex() int32 {
if m != nil {
return m.ChildIndex
}
return 0
}
func (m *PlanNode_ChildLink) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *PlanNode_ChildLink) GetVariable() string {
if m != nil {
return m.Variable
}
return ""
}
// Condensed representation of a node and its subtree. Only present for
// `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode].
type PlanNode_ShortRepresentation struct {
// A string representation of the expression subtree rooted at this node.
Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
// A mapping of (subquery variable name) -> (subquery node id) for cases
// where the `description` string of this node references a `SCALAR`
// subquery contained in the expression subtree rooted at this node. The
// referenced `SCALAR` subquery may not necessarily be a direct child of
// this node.
Subqueries map[string]int32 `protobuf:"bytes,2,rep,name=subqueries" json:"subqueries,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
}
func (m *PlanNode_ShortRepresentation) Reset() { *m = PlanNode_ShortRepresentation{} }
func (m *PlanNode_ShortRepresentation) String() string { return proto.CompactTextString(m) }
func (*PlanNode_ShortRepresentation) ProtoMessage() {}
func (*PlanNode_ShortRepresentation) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} }
func (m *PlanNode_ShortRepresentation) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *PlanNode_ShortRepresentation) GetSubqueries() map[string]int32 {
if m != nil {
return m.Subqueries
}
return nil
}
// Contains an ordered list of nodes appearing in the query plan.
type QueryPlan struct {
// The nodes in the query plan. Plan nodes are returned in pre-order starting
// with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` corresponds to its index in
// `plan_nodes`.
PlanNodes []*PlanNode `protobuf:"bytes,1,rep,name=plan_nodes,json=planNodes" json:"plan_nodes,omitempty"`
}
func (m *QueryPlan) Reset() { *m = QueryPlan{} }
func (m *QueryPlan) String() string { return proto.CompactTextString(m) }
func (*QueryPlan) ProtoMessage() {}
func (*QueryPlan) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *QueryPlan) GetPlanNodes() []*PlanNode {
if m != nil {
return m.PlanNodes
}
return nil
}
func init() {
proto.RegisterType((*PlanNode)(nil), "google.spanner.v1.PlanNode")
proto.RegisterType((*PlanNode_ChildLink)(nil), "google.spanner.v1.PlanNode.ChildLink")
proto.RegisterType((*PlanNode_ShortRepresentation)(nil), "google.spanner.v1.PlanNode.ShortRepresentation")
proto.RegisterType((*QueryPlan)(nil), "google.spanner.v1.QueryPlan")
proto.RegisterEnum("google.spanner.v1.PlanNode_Kind", PlanNode_Kind_name, PlanNode_Kind_value)
}
func init() { proto.RegisterFile("google/spanner/v1/query_plan.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 604 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xd3, 0x4c,
0x10, 0xfd, 0x9c, 0x26, 0xf9, 0x9a, 0x09, 0x4a, 0xc3, 0xb6, 0xa8, 0x56, 0x40, 0xc2, 0x44, 0x42,
0xca, 0x95, 0xad, 0xb4, 0x5c, 0x54, 0x45, 0x08, 0xd2, 0x34, 0xad, 0xa2, 0x46, 0x21, 0xac, 0xa1,
0x17, 0x28, 0x92, 0xb5, 0x89, 0x97, 0x74, 0x15, 0x67, 0xd7, 0x78, 0xed, 0xa8, 0x79, 0x09, 0x6e,
0x79, 0x07, 0x1e, 0x85, 0x17, 0xe0, 0x75, 0xd0, 0xae, 0x7f, 0x28, 0x14, 0x45, 0xe2, 0x6e, 0x66,
0xe7, 0xcc, 0xf1, 0xce, 0x39, 0xb3, 0x86, 0xf6, 0x42, 0x88, 0x45, 0x40, 0x1d, 0x19, 0x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x0e, 0xce, 0x9b,
0xff, 0xa1, 0x06, 0x00, 0x1e, 0x8c, 0x7a, 0xef, 0x87, 0x6f, 0xc7, 0xbd, 0x51, 0xd3, 0x40, 0x00,
0x55, 0xb7, 0xdf, 0x1b, 0xf5, 0x70, 0xb3, 0xd4, 0xbe, 0x84, 0xda, 0x3b, 0xf5, 0xe6, 0xd4, 0xcd,
0xd1, 0x29, 0x80, 0x7a, 0x7a, 0x1e, 0x17, 0x3e, 0x95, 0xa6, 0xa1, 0xc7, 0x7c, 0xbc, 0x65, 0x4c,
0x5c, 0x0b, 0xb3, 0x48, 0x9e, 0x7d, 0x35, 0xe0, 0xd1, 0x5c, 0xac, 0xee, 0xa3, 0xcf, 0x1a, 0xc5,
0x07, 0x26, 0xca, 0xfe, 0x89, 0xf1, 0xf1, 0x24, 0x03, 0x2d, 0x44, 0x40, 0xf8, 0xc2, 0x16, 0xd1,
0xc2, 0x59, 0x50, 0xae, 0x97, 0xc3, 0x49, 0x4b, 0x24, 0x64, 0xf2, 0xce, 0x7f, 0xe1, 0x65, 0x16,
0x7e, 0x2b, 0x1d, 0x5e, 0xa6, 0xad, 0xfd, 0x40, 0x24, 0xbe, 0xed, 0x66, 0x5f, 0xb9, 0xee, 0x7e,
0xcf, 0x2b, 0x53, 0x5d, 0x99, 0x66, 0x95, 0xe9, 0x75, 0x77, 0x56, 0xd5, 0xc4, 0xc7, 0x3f, 0x03,
0x00, 0x00, 0xff, 0xff, 0x53, 0xdb, 0x51, 0xa6, 0x6f, 0x04, 0x00, 0x00,
}

View File

@ -0,0 +1,312 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/result_set.proto
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Results from [Read][google.spanner.v1.Spanner.Read] or
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
type ResultSet struct {
// Metadata about the result set, such as row type information.
Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
// Each element in `rows` is a row whose format is defined by
// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
// in each row matches the ith field in
// [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
// encoded based on type as described
// [here][google.spanner.v1.TypeCode].
Rows []*google_protobuf1.ListValue `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
// Query plan and execution statistics for the query that produced this
// result set. These can be requested by setting
// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
Stats *ResultSetStats `protobuf:"bytes,3,opt,name=stats" json:"stats,omitempty"`
}
func (m *ResultSet) Reset() { *m = ResultSet{} }
func (m *ResultSet) String() string { return proto.CompactTextString(m) }
func (*ResultSet) ProtoMessage() {}
func (*ResultSet) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *ResultSet) GetMetadata() *ResultSetMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *ResultSet) GetRows() []*google_protobuf1.ListValue {
if m != nil {
return m.Rows
}
return nil
}
func (m *ResultSet) GetStats() *ResultSetStats {
if m != nil {
return m.Stats
}
return nil
}
// Partial results from a streaming read or SQL query. Streaming reads and
// SQL queries better tolerate large result sets, large rows, and large
// values, but are a little trickier to consume.
type PartialResultSet struct {
// Metadata about the result set, such as row type information.
// Only present in the first response.
Metadata *ResultSetMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
// A streamed result set consists of a stream of values, which might
// be split into many `PartialResultSet` messages to accommodate
// large rows and/or large values. Every N complete values defines a
// row, where N is equal to the number of entries in
// [metadata.row_type.fields][google.spanner.v1.StructType.fields].
//
// Most values are encoded based on type as described
// [here][google.spanner.v1.TypeCode].
//
// It is possible that the last value in values is "chunked",
// meaning that the rest of the value is sent in subsequent
// `PartialResultSet`(s). This is denoted by the [chunked_value][google.spanner.v1.PartialResultSet.chunked_value]
// field. Two or more chunked values can be merged to form a
// complete value as follows:
//
// * `bool/number/null`: cannot be chunked
// * `string`: concatenate the strings
// * `list`: concatenate the lists. If the last element in a list is a
// `string`, `list`, or `object`, merge it with the first element in
// the next list by applying these rules recursively.
// * `object`: concatenate the (field name, field value) pairs. If a
// field name is duplicated, then apply these rules recursively
// to merge the field values.
//
// Some examples of merging:
//
// # Strings are concatenated.
// "foo", "bar" => "foobar"
//
// # Lists of non-strings are concatenated.
// [2, 3], [4] => [2, 3, 4]
//
// # Lists are concatenated, but the last and first elements are merged
// # because they are strings.
// ["a", "b"], ["c", "d"] => ["a", "bc", "d"]
//
// # Lists are concatenated, but the last and first elements are merged
// # because they are lists. Recursively, the last and first elements
// # of the inner lists are merged because they are strings.
// ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"]
//
// # Non-overlapping object fields are combined.
// {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"}
//
// # Overlapping object fields are merged.
// {"a": "1"}, {"a": "2"} => {"a": "12"}
//
// # Examples of merging objects containing lists of strings.
// {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]}
//
// For a more complete example, suppose a streaming SQL query is
// yielding a result set whose rows contain a single string
// field. The following `PartialResultSet`s might be yielded:
//
// {
// "metadata": { ... }
// "values": ["Hello", "W"]
// "chunked_value": true
// "resume_token": "Af65..."
// }
// {
// "values": ["orl"]
// "chunked_value": true
// "resume_token": "Bqp2..."
// }
// {
// "values": ["d"]
// "resume_token": "Zx1B..."
// }
//
// This sequence of `PartialResultSet`s encodes two rows, one
// containing the field value `"Hello"`, and a second containing the
// field value `"World" = "W" + "orl" + "d"`.
Values []*google_protobuf1.Value `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"`
// If true, then the final value in [values][google.spanner.v1.PartialResultSet.values] is chunked, and must
// be combined with more values from subsequent `PartialResultSet`s
// to obtain a complete field value.
ChunkedValue bool `protobuf:"varint,3,opt,name=chunked_value,json=chunkedValue" json:"chunked_value,omitempty"`
// Streaming calls might be interrupted for a variety of reasons, such
// as TCP connection loss. If this occurs, the stream of results can
// be resumed by re-sending the original request and including
// `resume_token`. Note that executing any other transaction in the
// same session invalidates the token.
ResumeToken []byte `protobuf:"bytes,4,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
// Query plan and execution statistics for the query that produced this
// streaming result set. These can be requested by setting
// [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] and are sent
// only once with the last response in the stream.
Stats *ResultSetStats `protobuf:"bytes,5,opt,name=stats" json:"stats,omitempty"`
}
func (m *PartialResultSet) Reset() { *m = PartialResultSet{} }
func (m *PartialResultSet) String() string { return proto.CompactTextString(m) }
func (*PartialResultSet) ProtoMessage() {}
func (*PartialResultSet) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *PartialResultSet) GetMetadata() *ResultSetMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *PartialResultSet) GetValues() []*google_protobuf1.Value {
if m != nil {
return m.Values
}
return nil
}
func (m *PartialResultSet) GetChunkedValue() bool {
if m != nil {
return m.ChunkedValue
}
return false
}
func (m *PartialResultSet) GetResumeToken() []byte {
if m != nil {
return m.ResumeToken
}
return nil
}
func (m *PartialResultSet) GetStats() *ResultSetStats {
if m != nil {
return m.Stats
}
return nil
}
// Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].
type ResultSetMetadata struct {
// Indicates the field names and types for the rows in the result
// set. For example, a SQL query like `"SELECT UserId, UserName FROM
// Users"` could return a `row_type` value like:
//
// "fields": [
// { "name": "UserId", "type": { "code": "INT64" } },
// { "name": "UserName", "type": { "code": "STRING" } },
// ]
RowType *StructType `protobuf:"bytes,1,opt,name=row_type,json=rowType" json:"row_type,omitempty"`
// If the read or SQL query began a transaction as a side-effect, the
// information about the new transaction is yielded here.
Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
}
func (m *ResultSetMetadata) Reset() { *m = ResultSetMetadata{} }
func (m *ResultSetMetadata) String() string { return proto.CompactTextString(m) }
func (*ResultSetMetadata) ProtoMessage() {}
func (*ResultSetMetadata) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
func (m *ResultSetMetadata) GetRowType() *StructType {
if m != nil {
return m.RowType
}
return nil
}
func (m *ResultSetMetadata) GetTransaction() *Transaction {
if m != nil {
return m.Transaction
}
return nil
}
// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].
type ResultSetStats struct {
// [QueryPlan][google.spanner.v1.QueryPlan] for the query associated with this result.
QueryPlan *QueryPlan `protobuf:"bytes,1,opt,name=query_plan,json=queryPlan" json:"query_plan,omitempty"`
// Aggregated statistics from the execution of the query. Only present when
// the query is profiled. For example, a query could return the statistics as
// follows:
//
// {
// "rows_returned": "3",
// "elapsed_time": "1.22 secs",
// "cpu_time": "1.19 secs"
// }
QueryStats *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=query_stats,json=queryStats" json:"query_stats,omitempty"`
}
func (m *ResultSetStats) Reset() { *m = ResultSetStats{} }
func (m *ResultSetStats) String() string { return proto.CompactTextString(m) }
func (*ResultSetStats) ProtoMessage() {}
func (*ResultSetStats) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
func (m *ResultSetStats) GetQueryPlan() *QueryPlan {
if m != nil {
return m.QueryPlan
}
return nil
}
func (m *ResultSetStats) GetQueryStats() *google_protobuf1.Struct {
if m != nil {
return m.QueryStats
}
return nil
}
func init() {
proto.RegisterType((*ResultSet)(nil), "google.spanner.v1.ResultSet")
proto.RegisterType((*PartialResultSet)(nil), "google.spanner.v1.PartialResultSet")
proto.RegisterType((*ResultSetMetadata)(nil), "google.spanner.v1.ResultSetMetadata")
proto.RegisterType((*ResultSetStats)(nil), "google.spanner.v1.ResultSetStats")
}
func init() { proto.RegisterFile("google/spanner/v1/result_set.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 501 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcd, 0x6e, 0x13, 0x31,
0x14, 0x85, 0xe5, 0xf4, 0x87, 0xd4, 0x13, 0x10, 0xb5, 0x04, 0x1d, 0x45, 0x05, 0xa5, 0x29, 0x8b,
0xac, 0x3c, 0x4a, 0x59, 0x10, 0xa9, 0x9b, 0xaa, 0x2c, 0xd8, 0x80, 0x14, 0x9c, 0x28, 0x0b, 0x14,
0x69, 0xe4, 0x26, 0x66, 0x18, 0x75, 0x62, 0x4f, 0x6d, 0x4f, 0xa2, 0x3c, 0x00, 0x62, 0xc9, 0x9e,
0x47, 0xe0, 0x01, 0x78, 0x08, 0x9e, 0x88, 0x25, 0xf2, 0xcf, 0x24, 0x81, 0x19, 0x21, 0x21, 0x75,
0xe7, 0xf8, 0x7e, 0xe7, 0x9e, 0x7b, 0x3c, 0x37, 0xb0, 0x9b, 0x08, 0x91, 0x64, 0x2c, 0x52, 0x39,
0xe5, 0x9c, 0xc9, 0x68, 0xd9, 0x8f, 0x24, 0x53, 0x45, 0xa6, 0x63, 0xc5, 0x34, 0xce, 0xa5, 0xd0,
0x02, 0x1d, 0x3b, 0x06, 0x7b, 0x06, 0x2f, 0xfb, 0xed, 0x53, 0x2f, 0xa3, 0x79, 0x1a, 0x51, 0xce,
0x85, 0xa6, 0x3a, 0x15, 0x5c, 0x39, 0xc1, 0xa6, 0x6a, 0x7f, 0xdd, 0x14, 0x1f, 0x23, 0xa5, 0x65,
0x31, 0xf3, 0xed, 0xda, 0x35, 0x96, 0x77, 0x05, 0x93, 0xeb, 0x38, 0xcf, 0x28, 0xf7, 0xcc, 0x79,
0x95, 0xd1, 0x92, 0x72, 0x45, 0x67, 0xc6, 0xe7, 0x2f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b,
0x73, 0x40, 0x57, 0x30, 0xd8, 0xd9, 0xa1, 0xb0, 0x61, 0xc5, 0xcf, 0x6b, 0xc4, 0xe3, 0x2d, 0x45,
0x76, 0x25, 0xdd, 0x2f, 0x00, 0x3e, 0xfa, 0x73, 0x56, 0x74, 0x09, 0xe1, 0x76, 0x79, 0xfd, 0x40,
0xa7, 0x35, 0x3d, 0xdf, 0x1b, 0x68, 0x98, 0x51, 0x4e, 0x8e, 0xee, 0xca, 0x23, 0x1a, 0xc0, 0xc0,
0x89, 0xdd, 0x03, 0xb9, 0x89, 0x4e, 0x2a, 0xdf, 0xc5, 0x85, 0x21, 0xce, 0xc8, 0xda, 0x5e, 0x7f,
0x03, 0xf0, 0xc9, 0x4c, 0x2c, 0xaa, 0x46, 0xd7, 0xdb, 0x01, 0x87, 0x46, 0x3f, 0x04, 0x1f, 0x06,
0x1e, 0x4a, 0x44, 0x46, 0x79, 0x82, 0x85, 0x4c, 0xa2, 0x84, 0x71, 0xdb, 0x3d, 0x72, 0x25, 0x9a,
0xa7, 0x6a, 0xe7, 0x5f, 0x74, 0xe9, 0x8f, 0xbf, 0x00, 0xf8, 0xde, 0x38, 0x79, 0xe3, 0xd4, 0xaf,
0x33, 0x51, 0xcc, 0xf1, 0xc8, 0x1b, 0x4d, 0xfa, 0x3f, 0xcb, 0xca, 0xd4, 0x56, 0xa6, 0xbe, 0x32,
0x9d, 0xf4, 0x6f, 0x0e, 0x6d, 0xef, 0x97, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x06, 0x67, 0x6c,
0xee, 0x5c, 0x04, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,835 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/transaction.proto
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf2 "github.com/golang/protobuf/ptypes/duration"
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// # Transactions
//
//
// Each session can have at most one active transaction at a time. After the
// active transaction is completed, the session can immediately be
// re-used for the next transaction. It is not necessary to create a
// new session for each transaction.
//
// # Transaction Modes
//
// Cloud Spanner supports two transaction modes:
//
// 1. Locking read-write. This type of transaction is the only way
// to write data into Cloud Spanner. These transactions rely on
// pessimistic locking and, if necessary, two-phase commit.
// Locking read-write transactions may abort, requiring the
// application to retry.
//
// 2. Snapshot read-only. This transaction type provides guaranteed
// consistency across several reads, but does not allow
// writes. Snapshot read-only transactions can be configured to
// read at timestamps in the past. Snapshot read-only
// transactions do not need to be committed.
//
// For transactions that only read, snapshot read-only transactions
// provide simpler semantics and are almost always faster. In
// particular, read-only transactions do not take locks, so they do
// not conflict with read-write transactions. As a consequence of not
// taking locks, they also do not abort, so retry loops are not needed.
//
// Transactions may only read/write data in a single database. They
// may, however, read/write data in different tables within that
// database.
//
// ## Locking Read-Write Transactions
//
// Locking transactions may be used to atomically read-modify-write
// data anywhere in a database. This type of transaction is externally
// consistent.
//
// Clients should attempt to minimize the amount of time a transaction
// is active. Faster transactions commit with higher probability
// and cause less contention. Cloud Spanner attempts to keep read locks
// active as long as the transaction continues to do reads, and the
// transaction has not been terminated by
// [Commit][google.spanner.v1.Spanner.Commit] or
// [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of
// inactivity at the client may cause Cloud Spanner to release a
// transaction's locks and abort it.
//
// Reads performed within a transaction acquire locks on the data
// being read. Writes can only be done at commit time, after all reads
// have been completed.
// Conceptually, a read-write transaction consists of zero or more
// reads or SQL queries followed by
// [Commit][google.spanner.v1.Spanner.Commit]. At any time before
// [Commit][google.spanner.v1.Spanner.Commit], the client can send a
// [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
// transaction.
//
// ### Semantics
//
// Cloud Spanner can commit the transaction if all read locks it acquired
// are still valid at commit time, and it is able to acquire write
// locks for all writes. Cloud Spanner can abort the transaction for any
// reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
// that the transaction has not modified any user data in Cloud Spanner.
//
// Unless the transaction commits, Cloud Spanner makes no guarantees about
// how long the transaction's locks were held for. It is an error to
// use Cloud Spanner locks for any sort of mutual exclusion other than
// between Cloud Spanner transactions themselves.
//
// ### Retrying Aborted Transactions
//
// When a transaction aborts, the application can choose to retry the
// whole transaction again. To maximize the chances of successfully
// committing the retry, the client should execute the retry in the
// same session as the original attempt. The original session's lock
// priority increases with each consecutive abort, meaning that each
// attempt has a slightly better chance of success than the previous.
//
// Under some circumstances (e.g., many transactions attempting to
// modify the same row(s)), a transaction can abort many times in a
// short period before successfully committing. Thus, it is not a good
// idea to cap the number of retries a transaction can attempt;
// instead, it is better to limit the total amount of wall time spent
// retrying.
//
// ### Idle Transactions
//
// A transaction is considered idle if it has no outstanding reads or
// SQL queries and has not started a read or SQL query within the last 10
// seconds. Idle transactions can be aborted by Cloud Spanner so that they
// don't hold on to locks indefinitely. In that case, the commit will
// fail with error `ABORTED`.
//
// If this behavior is undesirable, periodically executing a simple
// SQL query in the transaction (e.g., `SELECT 1`) prevents the
// transaction from becoming idle.
//
// ## Snapshot Read-Only Transactions
//
// Snapshot read-only transactions provides a simpler method than
// locking read-write transactions for doing several consistent
// reads. However, this type of transaction does not support writes.
//
// Snapshot transactions do not take locks. Instead, they work by
// choosing a Cloud Spanner timestamp, then executing all reads at that
// timestamp. Since they do not acquire locks, they do not block
// concurrent read-write transactions.
//
// Unlike locking read-write transactions, snapshot read-only
// transactions never abort. They can fail if the chosen read
// timestamp is garbage collected; however, the default garbage
// collection policy is generous enough that most applications do not
// need to worry about this in practice.
//
// Snapshot read-only transactions do not need to call
// [Commit][google.spanner.v1.Spanner.Commit] or
// [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
// permitted to do so).
//
// To execute a snapshot transaction, the client specifies a timestamp
// bound, which tells Cloud Spanner how to choose a read timestamp.
//
// The types of timestamp bound are:
//
// - Strong (the default).
// - Bounded staleness.
// - Exact staleness.
//
// If the Cloud Spanner database to be read is geographically distributed,
// stale read-only transactions can execute more quickly than strong
// or read-write transaction, because they are able to execute far
// from the leader replica.
//
// Each type of timestamp bound is discussed in detail below.
//
// ### Strong
//
// Strong reads are guaranteed to see the effects of all transactions
// that have committed before the start of the read. Furthermore, all
// rows yielded by a single read are consistent with each other -- if
// any part of the read observes a transaction, all parts of the read
// see the transaction.
//
// Strong reads are not repeatable: two consecutive strong read-only
// transactions might return inconsistent results if there are
// concurrent writes. If consistency across reads is required, the
// reads should be executed within a transaction or at an exact read
// timestamp.
//
// See [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
//
// ### Exact Staleness
//
// These timestamp bounds execute reads at a user-specified
// timestamp. Reads at a timestamp are guaranteed to see a consistent
// prefix of the global transaction history: they observe
// modifications done by all transactions with a commit timestamp <=
// the read timestamp, and observe none of the modifications done by
// transactions with a larger commit timestamp. They will block until
// all conflicting transactions that may be assigned commit timestamps
// <= the read timestamp have finished.
//
// The timestamp can either be expressed as an absolute Cloud Spanner commit
// timestamp or a staleness relative to the current time.
//
// These modes do not require a "negotiation phase" to pick a
// timestamp. As a result, they execute slightly faster than the
// equivalent boundedly stale concurrency modes. On the other hand,
// boundedly stale reads usually return fresher results.
//
// See [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp] and
// [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
//
// ### Bounded Staleness
//
// Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
// subject to a user-provided staleness bound. Cloud Spanner chooses the
// newest timestamp within the staleness bound that allows execution
// of the reads at the closest available replica without blocking.
//
// All rows yielded are consistent with each other -- if any part of
// the read observes a transaction, all parts of the read see the
// transaction. Boundedly stale reads are not repeatable: two stale
// reads, even if they use the same staleness bound, can execute at
// different timestamps and thus return inconsistent results.
//
// Boundedly stale reads execute in two phases: the first phase
// negotiates a timestamp among all replicas needed to serve the
// read. In the second phase, reads are executed at the negotiated
// timestamp.
//
// As a result of the two phase execution, bounded staleness reads are
// usually a little slower than comparable exact staleness
// reads. However, they are typically able to return fresher
// results, and are more likely to execute at the closest replica.
//
// Because the timestamp negotiation requires up-front knowledge of
// which rows will be read, it can only be used with single-use
// read-only transactions.
//
// See [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness] and
// [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
//
// ### Old Read Timestamps and Garbage Collection
//
// Cloud Spanner continuously garbage collects deleted and overwritten data
// in the background to reclaim storage space. This process is known
// as "version GC". By default, version GC reclaims versions after they
// are one hour old. Because of this, Cloud Spanner cannot perform reads
// at read timestamps more than one hour in the past. This
// restriction also applies to in-progress reads and/or SQL queries whose
// timestamp become too old while executing. Reads and SQL queries with
// too-old read timestamps fail with the error `FAILED_PRECONDITION`.
type TransactionOptions struct {
// Required. The type of transaction.
//
// Types that are valid to be assigned to Mode:
// *TransactionOptions_ReadWrite_
// *TransactionOptions_ReadOnly_
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
}
func (m *TransactionOptions) Reset() { *m = TransactionOptions{} }
func (m *TransactionOptions) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions) ProtoMessage() {}
func (*TransactionOptions) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
type isTransactionOptions_Mode interface {
isTransactionOptions_Mode()
}
type TransactionOptions_ReadWrite_ struct {
ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,1,opt,name=read_write,json=readWrite,oneof"`
}
type TransactionOptions_ReadOnly_ struct {
ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,oneof"`
}
func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {}
func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
func (m *TransactionOptions) GetMode() isTransactionOptions_Mode {
if m != nil {
return m.Mode
}
return nil
}
func (m *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWrite {
if x, ok := m.GetMode().(*TransactionOptions_ReadWrite_); ok {
return x.ReadWrite
}
return nil
}
func (m *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnly {
if x, ok := m.GetMode().(*TransactionOptions_ReadOnly_); ok {
return x.ReadOnly
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TransactionOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TransactionOptions_OneofMarshaler, _TransactionOptions_OneofUnmarshaler, _TransactionOptions_OneofSizer, []interface{}{
(*TransactionOptions_ReadWrite_)(nil),
(*TransactionOptions_ReadOnly_)(nil),
}
}
func _TransactionOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TransactionOptions)
// mode
switch x := m.Mode.(type) {
case *TransactionOptions_ReadWrite_:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadWrite); err != nil {
return err
}
case *TransactionOptions_ReadOnly_:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadOnly); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TransactionOptions.Mode has unexpected type %T", x)
}
return nil
}
func _TransactionOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TransactionOptions)
switch tag {
case 1: // mode.read_write
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions_ReadWrite)
err := b.DecodeMessage(msg)
m.Mode = &TransactionOptions_ReadWrite_{msg}
return true, err
case 2: // mode.read_only
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions_ReadOnly)
err := b.DecodeMessage(msg)
m.Mode = &TransactionOptions_ReadOnly_{msg}
return true, err
default:
return false, nil
}
}
func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TransactionOptions)
// mode
switch x := m.Mode.(type) {
case *TransactionOptions_ReadWrite_:
s := proto.Size(x.ReadWrite)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadOnly_:
s := proto.Size(x.ReadOnly)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Message type to initiate a read-write transaction. Currently this
// transaction type has no options.
type TransactionOptions_ReadWrite struct {
}
func (m *TransactionOptions_ReadWrite) Reset() { *m = TransactionOptions_ReadWrite{} }
func (m *TransactionOptions_ReadWrite) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions_ReadWrite) ProtoMessage() {}
func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0, 0} }
// Message type to initiate a read-only transaction.
type TransactionOptions_ReadOnly struct {
// How to choose the timestamp for the read-only transaction.
//
// Types that are valid to be assigned to TimestampBound:
// *TransactionOptions_ReadOnly_Strong
// *TransactionOptions_ReadOnly_MinReadTimestamp
// *TransactionOptions_ReadOnly_MaxStaleness
// *TransactionOptions_ReadOnly_ReadTimestamp
// *TransactionOptions_ReadOnly_ExactStaleness
TimestampBound isTransactionOptions_ReadOnly_TimestampBound `protobuf_oneof:"timestamp_bound"`
// If true, the Cloud Spanner-selected read timestamp is included in
// the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
ReturnReadTimestamp bool `protobuf:"varint,6,opt,name=return_read_timestamp,json=returnReadTimestamp" json:"return_read_timestamp,omitempty"`
}
func (m *TransactionOptions_ReadOnly) Reset() { *m = TransactionOptions_ReadOnly{} }
func (m *TransactionOptions_ReadOnly) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions_ReadOnly) ProtoMessage() {}
func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0, 1} }
type isTransactionOptions_ReadOnly_TimestampBound interface {
isTransactionOptions_ReadOnly_TimestampBound()
}
type TransactionOptions_ReadOnly_Strong struct {
Strong bool `protobuf:"varint,1,opt,name=strong,oneof"`
}
type TransactionOptions_ReadOnly_MinReadTimestamp struct {
MinReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=min_read_timestamp,json=minReadTimestamp,oneof"`
}
type TransactionOptions_ReadOnly_MaxStaleness struct {
MaxStaleness *google_protobuf2.Duration `protobuf:"bytes,3,opt,name=max_staleness,json=maxStaleness,oneof"`
}
type TransactionOptions_ReadOnly_ReadTimestamp struct {
ReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,4,opt,name=read_timestamp,json=readTimestamp,oneof"`
}
type TransactionOptions_ReadOnly_ExactStaleness struct {
ExactStaleness *google_protobuf2.Duration `protobuf:"bytes,5,opt,name=exact_staleness,json=exactStaleness,oneof"`
}
func (*TransactionOptions_ReadOnly_Strong) isTransactionOptions_ReadOnly_TimestampBound() {}
func (*TransactionOptions_ReadOnly_MinReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {}
func (*TransactionOptions_ReadOnly_MaxStaleness) isTransactionOptions_ReadOnly_TimestampBound() {}
func (*TransactionOptions_ReadOnly_ReadTimestamp) isTransactionOptions_ReadOnly_TimestampBound() {}
func (*TransactionOptions_ReadOnly_ExactStaleness) isTransactionOptions_ReadOnly_TimestampBound() {}
func (m *TransactionOptions_ReadOnly) GetTimestampBound() isTransactionOptions_ReadOnly_TimestampBound {
if m != nil {
return m.TimestampBound
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetStrong() bool {
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_Strong); ok {
return x.Strong
}
return false
}
func (m *TransactionOptions_ReadOnly) GetMinReadTimestamp() *google_protobuf3.Timestamp {
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_MinReadTimestamp); ok {
return x.MinReadTimestamp
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetMaxStaleness() *google_protobuf2.Duration {
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_MaxStaleness); ok {
return x.MaxStaleness
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetReadTimestamp() *google_protobuf3.Timestamp {
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_ReadTimestamp); ok {
return x.ReadTimestamp
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetExactStaleness() *google_protobuf2.Duration {
if x, ok := m.GetTimestampBound().(*TransactionOptions_ReadOnly_ExactStaleness); ok {
return x.ExactStaleness
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetReturnReadTimestamp() bool {
if m != nil {
return m.ReturnReadTimestamp
}
return false
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TransactionOptions_ReadOnly) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TransactionOptions_ReadOnly_OneofMarshaler, _TransactionOptions_ReadOnly_OneofUnmarshaler, _TransactionOptions_ReadOnly_OneofSizer, []interface{}{
(*TransactionOptions_ReadOnly_Strong)(nil),
(*TransactionOptions_ReadOnly_MinReadTimestamp)(nil),
(*TransactionOptions_ReadOnly_MaxStaleness)(nil),
(*TransactionOptions_ReadOnly_ReadTimestamp)(nil),
(*TransactionOptions_ReadOnly_ExactStaleness)(nil),
}
}
func _TransactionOptions_ReadOnly_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TransactionOptions_ReadOnly)
// timestamp_bound
switch x := m.TimestampBound.(type) {
case *TransactionOptions_ReadOnly_Strong:
t := uint64(0)
if x.Strong {
t = 1
}
b.EncodeVarint(1<<3 | proto.WireVarint)
b.EncodeVarint(t)
case *TransactionOptions_ReadOnly_MinReadTimestamp:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MinReadTimestamp); err != nil {
return err
}
case *TransactionOptions_ReadOnly_MaxStaleness:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MaxStaleness); err != nil {
return err
}
case *TransactionOptions_ReadOnly_ReadTimestamp:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadTimestamp); err != nil {
return err
}
case *TransactionOptions_ReadOnly_ExactStaleness:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExactStaleness); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TransactionOptions_ReadOnly.TimestampBound has unexpected type %T", x)
}
return nil
}
func _TransactionOptions_ReadOnly_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TransactionOptions_ReadOnly)
switch tag {
case 1: // timestamp_bound.strong
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TimestampBound = &TransactionOptions_ReadOnly_Strong{x != 0}
return true, err
case 2: // timestamp_bound.min_read_timestamp
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf3.Timestamp)
err := b.DecodeMessage(msg)
m.TimestampBound = &TransactionOptions_ReadOnly_MinReadTimestamp{msg}
return true, err
case 3: // timestamp_bound.max_staleness
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf2.Duration)
err := b.DecodeMessage(msg)
m.TimestampBound = &TransactionOptions_ReadOnly_MaxStaleness{msg}
return true, err
case 4: // timestamp_bound.read_timestamp
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf3.Timestamp)
err := b.DecodeMessage(msg)
m.TimestampBound = &TransactionOptions_ReadOnly_ReadTimestamp{msg}
return true, err
case 5: // timestamp_bound.exact_staleness
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf2.Duration)
err := b.DecodeMessage(msg)
m.TimestampBound = &TransactionOptions_ReadOnly_ExactStaleness{msg}
return true, err
default:
return false, nil
}
}
func _TransactionOptions_ReadOnly_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TransactionOptions_ReadOnly)
// timestamp_bound
switch x := m.TimestampBound.(type) {
case *TransactionOptions_ReadOnly_Strong:
n += proto.SizeVarint(1<<3 | proto.WireVarint)
n += 1
case *TransactionOptions_ReadOnly_MinReadTimestamp:
s := proto.Size(x.MinReadTimestamp)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadOnly_MaxStaleness:
s := proto.Size(x.MaxStaleness)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadOnly_ReadTimestamp:
s := proto.Size(x.ReadTimestamp)
n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadOnly_ExactStaleness:
s := proto.Size(x.ExactStaleness)
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A transaction.
type Transaction struct {
// `id` may be used to identify the transaction in subsequent
// [Read][google.spanner.v1.Spanner.Read],
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
// [Commit][google.spanner.v1.Spanner.Commit], or
// [Rollback][google.spanner.v1.Spanner.Rollback] calls.
//
// Single-use read-only transactions do not have IDs, because
// single-use transactions do not support multiple requests.
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// For snapshot read-only transactions, the read timestamp chosen
// for the transaction. Not returned by default: see
// [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
//
// A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
// Example: `"2014-10-02T15:01:23.045123456Z"`.
ReadTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=read_timestamp,json=readTimestamp" json:"read_timestamp,omitempty"`
}
func (m *Transaction) Reset() { *m = Transaction{} }
func (m *Transaction) String() string { return proto.CompactTextString(m) }
func (*Transaction) ProtoMessage() {}
func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} }
func (m *Transaction) GetId() []byte {
if m != nil {
return m.Id
}
return nil
}
func (m *Transaction) GetReadTimestamp() *google_protobuf3.Timestamp {
if m != nil {
return m.ReadTimestamp
}
return nil
}
// This message is used to select the transaction in which a
// [Read][google.spanner.v1.Spanner.Read] or
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.
//
// See [TransactionOptions][google.spanner.v1.TransactionOptions] for more information about transactions.
type TransactionSelector struct {
// If no fields are set, the default is a single use transaction
// with strong concurrency.
//
// Types that are valid to be assigned to Selector:
// *TransactionSelector_SingleUse
// *TransactionSelector_Id
// *TransactionSelector_Begin
Selector isTransactionSelector_Selector `protobuf_oneof:"selector"`
}
func (m *TransactionSelector) Reset() { *m = TransactionSelector{} }
func (m *TransactionSelector) String() string { return proto.CompactTextString(m) }
func (*TransactionSelector) ProtoMessage() {}
func (*TransactionSelector) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} }
type isTransactionSelector_Selector interface {
isTransactionSelector_Selector()
}
type TransactionSelector_SingleUse struct {
SingleUse *TransactionOptions `protobuf:"bytes,1,opt,name=single_use,json=singleUse,oneof"`
}
type TransactionSelector_Id struct {
Id []byte `protobuf:"bytes,2,opt,name=id,proto3,oneof"`
}
type TransactionSelector_Begin struct {
Begin *TransactionOptions `protobuf:"bytes,3,opt,name=begin,oneof"`
}
func (*TransactionSelector_SingleUse) isTransactionSelector_Selector() {}
func (*TransactionSelector_Id) isTransactionSelector_Selector() {}
func (*TransactionSelector_Begin) isTransactionSelector_Selector() {}
func (m *TransactionSelector) GetSelector() isTransactionSelector_Selector {
if m != nil {
return m.Selector
}
return nil
}
func (m *TransactionSelector) GetSingleUse() *TransactionOptions {
if x, ok := m.GetSelector().(*TransactionSelector_SingleUse); ok {
return x.SingleUse
}
return nil
}
func (m *TransactionSelector) GetId() []byte {
if x, ok := m.GetSelector().(*TransactionSelector_Id); ok {
return x.Id
}
return nil
}
func (m *TransactionSelector) GetBegin() *TransactionOptions {
if x, ok := m.GetSelector().(*TransactionSelector_Begin); ok {
return x.Begin
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TransactionSelector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TransactionSelector_OneofMarshaler, _TransactionSelector_OneofUnmarshaler, _TransactionSelector_OneofSizer, []interface{}{
(*TransactionSelector_SingleUse)(nil),
(*TransactionSelector_Id)(nil),
(*TransactionSelector_Begin)(nil),
}
}
func _TransactionSelector_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TransactionSelector)
// selector
switch x := m.Selector.(type) {
case *TransactionSelector_SingleUse:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.SingleUse); err != nil {
return err
}
case *TransactionSelector_Id:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeRawBytes(x.Id)
case *TransactionSelector_Begin:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Begin); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TransactionSelector.Selector has unexpected type %T", x)
}
return nil
}
func _TransactionSelector_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TransactionSelector)
switch tag {
case 1: // selector.single_use
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions)
err := b.DecodeMessage(msg)
m.Selector = &TransactionSelector_SingleUse{msg}
return true, err
case 2: // selector.id
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.Selector = &TransactionSelector_Id{x}
return true, err
case 3: // selector.begin
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions)
err := b.DecodeMessage(msg)
m.Selector = &TransactionSelector_Begin{msg}
return true, err
default:
return false, nil
}
}
func _TransactionSelector_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TransactionSelector)
// selector
switch x := m.Selector.(type) {
case *TransactionSelector_SingleUse:
s := proto.Size(x.SingleUse)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionSelector_Id:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Id)))
n += len(x.Id)
case *TransactionSelector_Begin:
s := proto.Size(x.Begin)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*TransactionOptions)(nil), "google.spanner.v1.TransactionOptions")
proto.RegisterType((*TransactionOptions_ReadWrite)(nil), "google.spanner.v1.TransactionOptions.ReadWrite")
proto.RegisterType((*TransactionOptions_ReadOnly)(nil), "google.spanner.v1.TransactionOptions.ReadOnly")
proto.RegisterType((*Transaction)(nil), "google.spanner.v1.Transaction")
proto.RegisterType((*TransactionSelector)(nil), "google.spanner.v1.TransactionSelector")
}
func init() { proto.RegisterFile("google/spanner/v1/transaction.proto", fileDescriptor5) }
var fileDescriptor5 = []byte{
// 537 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xd1, 0x8a, 0xd3, 0x40,
0x14, 0x86, 0xd3, 0x6e, 0xb7, 0x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e8, 0x4f, 0x03, 0x4e, 0x2a, 0x2d, 0x66, 0x24, 0x26,
0x4b, 0xc5, 0x05, 0x7a, 0x0f, 0x20, 0x29, 0x8b, 0x62, 0x12, 0x64, 0xb2, 0x7c, 0xb6, 0xcf, 0x77,
0x7a, 0x65, 0xf9, 0x63, 0x2d, 0xac, 0x9f, 0x25, 0x41, 0x03, 0x8d, 0x9c, 0x63, 0xf5, 0x3c, 0x4b,
0x43, 0xbf, 0x81, 0xfd, 0x05, 0x89, 0x28, 0x33, 0x7b, 0xde, 0x39, 0xb4, 0x70, 0x4d, 0x00, 0x3a,
0xd2, 0x40, 0x4e, 0x7e, 0x35, 0xe0, 0x74, 0xc9, 0x93, 0x7a, 0xc2, 0x64, 0x50, 0x89, 0x98, 0xe6,
0x43, 0x98, 0x36, 0xbe, 0xbe, 0x32, 0xb2, 0x88, 0xc7, 0x98, 0x45, 0x0e, 0x17, 0x91, 0x1b, 0x11,
0xa6, 0x47, 0xe4, 0x16, 0x25, 0x9c, 0x52, 0x59, 0xf9, 0x5b, 0x79, 0x6d, 0x3e, 0x7f, 0x37, 0x1f,
0x7c, 0x28, 0xac, 0xe7, 0x31, 0xcf, 0x42, 0x67, 0x66, 0xfa, 0x5c, 0x8f, 0xff, 0x96, 0x95, 0xb9,
0xae, 0xcc, 0x4d, 0x65, 0x7e, 0x3d, 0x5e, 0xb4, 0x75, 0xf0, 0xcb, 0xff, 0x01, 0x00, 0x00, 0xff,
0xff, 0xa6, 0x28, 0x2f, 0x4a, 0xae, 0x04, 0x00, 0x00,
}

View File

@ -0,0 +1,217 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/spanner/v1/type.proto
package spanner
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// `TypeCode` is used as part of [Type][google.spanner.v1.Type] to
// indicate the type of a Cloud Spanner value.
//
// Each legal value of a type can be encoded to or decoded from a JSON
// value, using the encodings described below. All Cloud Spanner values can
// be `null`, regardless of type; `null`s are always encoded as a JSON
// `null`.
type TypeCode int32
const (
// Not specified.
TypeCode_TYPE_CODE_UNSPECIFIED TypeCode = 0
// Encoded as JSON `true` or `false`.
TypeCode_BOOL TypeCode = 1
// Encoded as `string`, in decimal format.
TypeCode_INT64 TypeCode = 2
// Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
// `"-Infinity"`.
TypeCode_FLOAT64 TypeCode = 3
// Encoded as `string` in RFC 3339 timestamp format. The time zone
// must be present, and must be `"Z"`.
TypeCode_TIMESTAMP TypeCode = 4
// Encoded as `string` in RFC 3339 date format.
TypeCode_DATE TypeCode = 5
// Encoded as `string`.
TypeCode_STRING TypeCode = 6
// Encoded as a base64-encoded `string`, as described in RFC 4648,
// section 4.
TypeCode_BYTES TypeCode = 7
// Encoded as `list`, where the list elements are represented
// according to [array_element_type][google.spanner.v1.Type.array_element_type].
TypeCode_ARRAY TypeCode = 8
// Encoded as `list`, where list element `i` is represented according
// to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
TypeCode_STRUCT TypeCode = 9
)
var TypeCode_name = map[int32]string{
0: "TYPE_CODE_UNSPECIFIED",
1: "BOOL",
2: "INT64",
3: "FLOAT64",
4: "TIMESTAMP",
5: "DATE",
6: "STRING",
7: "BYTES",
8: "ARRAY",
9: "STRUCT",
}
var TypeCode_value = map[string]int32{
"TYPE_CODE_UNSPECIFIED": 0,
"BOOL": 1,
"INT64": 2,
"FLOAT64": 3,
"TIMESTAMP": 4,
"DATE": 5,
"STRING": 6,
"BYTES": 7,
"ARRAY": 8,
"STRUCT": 9,
}
func (x TypeCode) String() string {
return proto.EnumName(TypeCode_name, int32(x))
}
func (TypeCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
// `Type` indicates the type of a Cloud Spanner value, as might be stored in a
// table cell or returned from an SQL query.
type Type struct {
// Required. The [TypeCode][google.spanner.v1.TypeCode] for this type.
Code TypeCode `protobuf:"varint,1,opt,name=code,enum=google.spanner.v1.TypeCode" json:"code,omitempty"`
// If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type`
// is the type of the array elements.
ArrayElementType *Type `protobuf:"bytes,2,opt,name=array_element_type,json=arrayElementType" json:"array_element_type,omitempty"`
// If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type`
// provides type information for the struct's fields.
StructType *StructType `protobuf:"bytes,3,opt,name=struct_type,json=structType" json:"struct_type,omitempty"`
}
func (m *Type) Reset() { *m = Type{} }
func (m *Type) String() string { return proto.CompactTextString(m) }
func (*Type) ProtoMessage() {}
func (*Type) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
func (m *Type) GetCode() TypeCode {
if m != nil {
return m.Code
}
return TypeCode_TYPE_CODE_UNSPECIFIED
}
func (m *Type) GetArrayElementType() *Type {
if m != nil {
return m.ArrayElementType
}
return nil
}
func (m *Type) GetStructType() *StructType {
if m != nil {
return m.StructType
}
return nil
}
// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type.
type StructType struct {
// The list of fields that make up this struct. Order is
// significant, because values of this struct type are represented as
// lists, where the order of field values matches the order of
// fields in the [StructType][google.spanner.v1.StructType]. In turn, the order of fields
// matches the order of columns in a read request, or the order of
// fields in the `SELECT` clause of a query.
Fields []*StructType_Field `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"`
}
func (m *StructType) Reset() { *m = StructType{} }
func (m *StructType) String() string { return proto.CompactTextString(m) }
func (*StructType) ProtoMessage() {}
func (*StructType) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} }
func (m *StructType) GetFields() []*StructType_Field {
if m != nil {
return m.Fields
}
return nil
}
// Message representing a single field of a struct.
type StructType_Field struct {
// The name of the field. For reads, this is the column name. For
// SQL queries, it is the column alias (e.g., `"Word"` in the
// query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
// `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
// columns might have an empty name (e.g., !"SELECT
// UPPER(ColName)"`). Note that a query result can contain
// multiple fields with the same name.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The type of the field.
Type *Type `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
}
func (m *StructType_Field) Reset() { *m = StructType_Field{} }
func (m *StructType_Field) String() string { return proto.CompactTextString(m) }
func (*StructType_Field) ProtoMessage() {}
func (*StructType_Field) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1, 0} }
func (m *StructType_Field) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *StructType_Field) GetType() *Type {
if m != nil {
return m.Type
}
return nil
}
func init() {
proto.RegisterType((*Type)(nil), "google.spanner.v1.Type")
proto.RegisterType((*StructType)(nil), "google.spanner.v1.StructType")
proto.RegisterType((*StructType_Field)(nil), "google.spanner.v1.StructType.Field")
proto.RegisterEnum("google.spanner.v1.TypeCode", TypeCode_name, TypeCode_value)
}
func init() { proto.RegisterFile("google/spanner/v1/type.proto", fileDescriptor6) }
var fileDescriptor6 = []byte{
// 444 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xd1, 0x8a, 0xd3, 0x40,
0x14, 0x86, 0x9d, 0x6d, 0xda, 0x6d, 0x4e, 0x51, 0xc6, 0x81, 0x65, 0xeb, 0xaa, 0x50, 0xd6, 0x9b,
0xa2, 0x90, 0xd0, 0x2a, 0x22, 0x2c, 0x08, 0x69, 0x3a, 0x5d, 0x03, 0xbb, 0x6d, 0x48, 0x66, 0x17,
0x2a, 0x85, 0x32, 0xb6, 0x63, 0x28, 0xa4, 0x33, 0x21, 0xc9, 0x2e, 0xf4, 0x25, 0xbc, 0xd0, 0xb7,
0xf0, 0x21, 0x7c, 0x00, 0x9f, 0x4a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