1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/spanner/v1/keys.proto 3 4package spanner 5 6import ( 7 fmt "fmt" 8 math "math" 9 10 proto "github.com/golang/protobuf/proto" 11 _struct "github.com/golang/protobuf/ptypes/struct" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13) 14 15// Reference imports to suppress errors if they are not otherwise used. 16var _ = proto.Marshal 17var _ = fmt.Errorf 18var _ = math.Inf 19 20// This is a compile-time assertion to ensure that this generated file 21// is compatible with the proto package it is being compiled against. 22// A compilation error at this line likely means your copy of the 23// proto package needs to be updated. 24const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 25 26// KeyRange represents a range of rows in a table or index. 27// 28// A range has a start key and an end key. These keys can be open or 29// closed, indicating if the range includes rows with that key. 30// 31// Keys are represented by lists, where the ith value in the list 32// corresponds to the ith component of the table or index primary key. 33// Individual values are encoded as described 34// [here][google.spanner.v1.TypeCode]. 35// 36// For example, consider the following table definition: 37// 38// CREATE TABLE UserEvents ( 39// UserName STRING(MAX), 40// EventDate STRING(10) 41// ) PRIMARY KEY(UserName, EventDate); 42// 43// The following keys name rows in this table: 44// 45// ["Bob", "2014-09-23"] 46// ["Alfred", "2015-06-12"] 47// 48// Since the `UserEvents` table's `PRIMARY KEY` clause names two 49// columns, each `UserEvents` key has two elements; the first is the 50// `UserName`, and the second is the `EventDate`. 51// 52// Key ranges with multiple components are interpreted 53// lexicographically by component using the table or index key's declared 54// sort order. For example, the following range returns all events for 55// user `"Bob"` that occurred in the year 2015: 56// 57// "start_closed": ["Bob", "2015-01-01"] 58// "end_closed": ["Bob", "2015-12-31"] 59// 60// Start and end keys can omit trailing key components. This affects the 61// inclusion and exclusion of rows that exactly match the provided key 62// components: if the key is closed, then rows that exactly match the 63// provided components are included; if the key is open, then rows 64// that exactly match are not included. 65// 66// For example, the following range includes all events for `"Bob"` that 67// occurred during and after the year 2000: 68// 69// "start_closed": ["Bob", "2000-01-01"] 70// "end_closed": ["Bob"] 71// 72// The next example retrieves all events for `"Bob"`: 73// 74// "start_closed": ["Bob"] 75// "end_closed": ["Bob"] 76// 77// To retrieve events before the year 2000: 78// 79// "start_closed": ["Bob"] 80// "end_open": ["Bob", "2000-01-01"] 81// 82// The following range includes all rows in the table: 83// 84// "start_closed": [] 85// "end_closed": [] 86// 87// This range returns all users whose `UserName` begins with any 88// character from A to C: 89// 90// "start_closed": ["A"] 91// "end_open": ["D"] 92// 93// This range returns all users whose `UserName` begins with B: 94// 95// "start_closed": ["B"] 96// "end_open": ["C"] 97// 98// Key ranges honor column sort order. For example, suppose a table is 99// defined as follows: 100// 101// CREATE TABLE DescendingSortedTable { 102// Key INT64, 103// ... 104// ) PRIMARY KEY(Key DESC); 105// 106// The following range retrieves all rows with key values between 1 107// and 100 inclusive: 108// 109// "start_closed": ["100"] 110// "end_closed": ["1"] 111// 112// Note that 100 is passed as the start, and 1 is passed as the end, 113// because `Key` is a descending column in the schema. 114type KeyRange struct { 115 // The start key must be provided. It can be either closed or open. 116 // 117 // Types that are valid to be assigned to StartKeyType: 118 // *KeyRange_StartClosed 119 // *KeyRange_StartOpen 120 StartKeyType isKeyRange_StartKeyType `protobuf_oneof:"start_key_type"` 121 // The end key must be provided. It can be either closed or open. 122 // 123 // Types that are valid to be assigned to EndKeyType: 124 // *KeyRange_EndClosed 125 // *KeyRange_EndOpen 126 EndKeyType isKeyRange_EndKeyType `protobuf_oneof:"end_key_type"` 127 XXX_NoUnkeyedLiteral struct{} `json:"-"` 128 XXX_unrecognized []byte `json:"-"` 129 XXX_sizecache int32 `json:"-"` 130} 131 132func (m *KeyRange) Reset() { *m = KeyRange{} } 133func (m *KeyRange) String() string { return proto.CompactTextString(m) } 134func (*KeyRange) ProtoMessage() {} 135func (*KeyRange) Descriptor() ([]byte, []int) { 136 return fileDescriptor_558e8abca28348dd, []int{0} 137} 138 139func (m *KeyRange) XXX_Unmarshal(b []byte) error { 140 return xxx_messageInfo_KeyRange.Unmarshal(m, b) 141} 142func (m *KeyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 143 return xxx_messageInfo_KeyRange.Marshal(b, m, deterministic) 144} 145func (m *KeyRange) XXX_Merge(src proto.Message) { 146 xxx_messageInfo_KeyRange.Merge(m, src) 147} 148func (m *KeyRange) XXX_Size() int { 149 return xxx_messageInfo_KeyRange.Size(m) 150} 151func (m *KeyRange) XXX_DiscardUnknown() { 152 xxx_messageInfo_KeyRange.DiscardUnknown(m) 153} 154 155var xxx_messageInfo_KeyRange proto.InternalMessageInfo 156 157type isKeyRange_StartKeyType interface { 158 isKeyRange_StartKeyType() 159} 160 161type KeyRange_StartClosed struct { 162 StartClosed *_struct.ListValue `protobuf:"bytes,1,opt,name=start_closed,json=startClosed,proto3,oneof"` 163} 164 165type KeyRange_StartOpen struct { 166 StartOpen *_struct.ListValue `protobuf:"bytes,2,opt,name=start_open,json=startOpen,proto3,oneof"` 167} 168 169func (*KeyRange_StartClosed) isKeyRange_StartKeyType() {} 170 171func (*KeyRange_StartOpen) isKeyRange_StartKeyType() {} 172 173func (m *KeyRange) GetStartKeyType() isKeyRange_StartKeyType { 174 if m != nil { 175 return m.StartKeyType 176 } 177 return nil 178} 179 180func (m *KeyRange) GetStartClosed() *_struct.ListValue { 181 if x, ok := m.GetStartKeyType().(*KeyRange_StartClosed); ok { 182 return x.StartClosed 183 } 184 return nil 185} 186 187func (m *KeyRange) GetStartOpen() *_struct.ListValue { 188 if x, ok := m.GetStartKeyType().(*KeyRange_StartOpen); ok { 189 return x.StartOpen 190 } 191 return nil 192} 193 194type isKeyRange_EndKeyType interface { 195 isKeyRange_EndKeyType() 196} 197 198type KeyRange_EndClosed struct { 199 EndClosed *_struct.ListValue `protobuf:"bytes,3,opt,name=end_closed,json=endClosed,proto3,oneof"` 200} 201 202type KeyRange_EndOpen struct { 203 EndOpen *_struct.ListValue `protobuf:"bytes,4,opt,name=end_open,json=endOpen,proto3,oneof"` 204} 205 206func (*KeyRange_EndClosed) isKeyRange_EndKeyType() {} 207 208func (*KeyRange_EndOpen) isKeyRange_EndKeyType() {} 209 210func (m *KeyRange) GetEndKeyType() isKeyRange_EndKeyType { 211 if m != nil { 212 return m.EndKeyType 213 } 214 return nil 215} 216 217func (m *KeyRange) GetEndClosed() *_struct.ListValue { 218 if x, ok := m.GetEndKeyType().(*KeyRange_EndClosed); ok { 219 return x.EndClosed 220 } 221 return nil 222} 223 224func (m *KeyRange) GetEndOpen() *_struct.ListValue { 225 if x, ok := m.GetEndKeyType().(*KeyRange_EndOpen); ok { 226 return x.EndOpen 227 } 228 return nil 229} 230 231// XXX_OneofWrappers is for the internal use of the proto package. 232func (*KeyRange) XXX_OneofWrappers() []interface{} { 233 return []interface{}{ 234 (*KeyRange_StartClosed)(nil), 235 (*KeyRange_StartOpen)(nil), 236 (*KeyRange_EndClosed)(nil), 237 (*KeyRange_EndOpen)(nil), 238 } 239} 240 241// `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All 242// the keys are expected to be in the same table or index. The keys need 243// not be sorted in any particular way. 244// 245// If the same key is specified multiple times in the set (for example 246// if two ranges, two keys, or a key and a range overlap), Cloud Spanner 247// behaves as if the key were only specified once. 248type KeySet struct { 249 // A list of specific keys. Entries in `keys` should have exactly as 250 // many elements as there are columns in the primary or index key 251 // with which this `KeySet` is used. Individual key values are 252 // encoded as described [here][google.spanner.v1.TypeCode]. 253 Keys []*_struct.ListValue `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` 254 // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about 255 // key range specifications. 256 Ranges []*KeyRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"` 257 // For convenience `all` can be set to `true` to indicate that this 258 // `KeySet` matches all keys in the table or index. Note that any keys 259 // specified in `keys` or `ranges` are only yielded once. 260 All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"` 261 XXX_NoUnkeyedLiteral struct{} `json:"-"` 262 XXX_unrecognized []byte `json:"-"` 263 XXX_sizecache int32 `json:"-"` 264} 265 266func (m *KeySet) Reset() { *m = KeySet{} } 267func (m *KeySet) String() string { return proto.CompactTextString(m) } 268func (*KeySet) ProtoMessage() {} 269func (*KeySet) Descriptor() ([]byte, []int) { 270 return fileDescriptor_558e8abca28348dd, []int{1} 271} 272 273func (m *KeySet) XXX_Unmarshal(b []byte) error { 274 return xxx_messageInfo_KeySet.Unmarshal(m, b) 275} 276func (m *KeySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 277 return xxx_messageInfo_KeySet.Marshal(b, m, deterministic) 278} 279func (m *KeySet) XXX_Merge(src proto.Message) { 280 xxx_messageInfo_KeySet.Merge(m, src) 281} 282func (m *KeySet) XXX_Size() int { 283 return xxx_messageInfo_KeySet.Size(m) 284} 285func (m *KeySet) XXX_DiscardUnknown() { 286 xxx_messageInfo_KeySet.DiscardUnknown(m) 287} 288 289var xxx_messageInfo_KeySet proto.InternalMessageInfo 290 291func (m *KeySet) GetKeys() []*_struct.ListValue { 292 if m != nil { 293 return m.Keys 294 } 295 return nil 296} 297 298func (m *KeySet) GetRanges() []*KeyRange { 299 if m != nil { 300 return m.Ranges 301 } 302 return nil 303} 304 305func (m *KeySet) GetAll() bool { 306 if m != nil { 307 return m.All 308 } 309 return false 310} 311 312func init() { 313 proto.RegisterType((*KeyRange)(nil), "google.spanner.v1.KeyRange") 314 proto.RegisterType((*KeySet)(nil), "google.spanner.v1.KeySet") 315} 316 317func init() { 318 proto.RegisterFile("google/spanner/v1/keys.proto", fileDescriptor_558e8abca28348dd) 319} 320 321var fileDescriptor_558e8abca28348dd = []byte{ 322 // 372 bytes of a gzipped FileDescriptorProto 323 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6b, 0xea, 0x30, 324 0x1c, 0xc7, 0x5f, 0xab, 0xf8, 0x34, 0x8a, 0xf8, 0x0a, 0x8f, 0x57, 0x7c, 0x3b, 0x88, 0xa7, 0x9d, 325 0x52, 0x3a, 0x0f, 0x1b, 0x78, 0x18, 0xd4, 0xc3, 0x06, 0x0e, 0x26, 0x15, 0x3c, 0x0c, 0x41, 0xa2, 326 0xfd, 0xad, 0x14, 0xb3, 0x24, 0x34, 0xa9, 0xd0, 0xd3, 0xfe, 0x87, 0xfd, 0x05, 0x3b, 0xef, 0x4f, 327 0xd9, 0x5f, 0x35, 0x92, 0xa6, 0x63, 0x20, 0x6c, 0xde, 0x52, 0xbe, 0xbf, 0xcf, 0xf7, 0x93, 0x26, 328 0x41, 0x67, 0x29, 0xe7, 0x29, 0x85, 0x40, 0x0a, 0xc2, 0x18, 0xe4, 0xc1, 0x21, 0x0c, 0xf6, 0x50, 329 0x4a, 0x2c, 0x72, 0xae, 0xb8, 0xf7, 0xa7, 0x4a, 0xb1, 0x4d, 0xf1, 0x21, 0x1c, 0xd6, 0x80, 0x19, 330 0xd8, 0x16, 0x8f, 0x81, 0x54, 0x79, 0xb1, 0x53, 0x15, 0xf0, 0x99, 0x12, 0x91, 0x05, 0x84, 0x31, 331 0xae, 0x88, 0xca, 0x38, 0xb3, 0x75, 0xe3, 0x57, 0x17, 0xb5, 0xe7, 0x50, 0xc6, 0x84, 0xa5, 0xe0, 332 0x5d, 0xa3, 0x9e, 0x54, 0x24, 0x57, 0x9b, 0x1d, 0xe5, 0x12, 0x12, 0xdf, 0x19, 0x39, 0xe7, 0xdd, 333 0x8b, 0x21, 0xb6, 0xca, 0xba, 0x1f, 0xdf, 0x65, 0x52, 0xad, 0x08, 0x2d, 0xe0, 0xf6, 0x57, 0xdc, 334 0x35, 0xc4, 0xcc, 0x00, 0xde, 0x14, 0xa1, 0xaa, 0x80, 0x0b, 0x60, 0xbe, 0x7b, 0x02, 0xde, 0x31, 335 0xf3, 0xf7, 0x02, 0x98, 0x86, 0x81, 0x25, 0xb5, 0xbb, 0xf1, 0x23, 0xec, 0xc4, 0x1d, 0x60, 0x89, 336 0x35, 0x5f, 0xa2, 0xb6, 0x86, 0x8d, 0xb7, 0x79, 0x02, 0xfa, 0x1b, 0x58, 0xa2, 0xad, 0xd1, 0x00, 337 0xf5, 0xab, 0x2d, 0xef, 0xa1, 0xdc, 0xa8, 0x52, 0x40, 0xd4, 0x47, 0x3d, 0x5d, 0x55, 0x7f, 0x8f, 338 0x9f, 0x51, 0x6b, 0x0e, 0xe5, 0x12, 0x94, 0x87, 0x51, 0x53, 0xdf, 0x84, 0xef, 0x8c, 0x1a, 0xdf, 339 0x0b, 0x62, 0x33, 0xe7, 0x4d, 0x50, 0x2b, 0xd7, 0x07, 0x2b, 0x7d, 0xd7, 0x10, 0xff, 0xf1, 0xd1, 340 0xe5, 0xe1, 0xfa, 0xf0, 0x63, 0x3b, 0xea, 0x0d, 0x50, 0x83, 0x50, 0x6a, 0xfe, 0xbf, 0x1d, 0xeb, 341 0x65, 0xf4, 0xe2, 0xa0, 0xbf, 0x3b, 0xfe, 0x74, 0x0c, 0x47, 0x9d, 0x39, 0x94, 0x72, 0xa1, 0xf5, 342 0x0b, 0xe7, 0xe1, 0xca, 0xe6, 0x29, 0xa7, 0x84, 0xa5, 0x98, 0xe7, 0x69, 0x90, 0x02, 0x33, 0x9b, 343 0x0b, 0xaa, 0x88, 0x88, 0x4c, 0x7e, 0x79, 0x56, 0x53, 0xbb, 0x7c, 0x73, 0xff, 0xdd, 0x54, 0xe8, 344 0x8c, 0xf2, 0x22, 0xc1, 0x4b, 0x2b, 0x58, 0x85, 0xef, 0x75, 0xb2, 0x36, 0xc9, 0xda, 0x26, 0xeb, 345 0x55, 0xb8, 0x6d, 0x99, 0xe2, 0xc9, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0x3a, 0xf6, 0xbf, 346 0xae, 0x02, 0x00, 0x00, 347} 348