/
keys.pb.go
446 lines (418 loc) · 14.8 KB
/
keys.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
// 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
PartitionOptions
PartitionQueryRequest
PartitionReadRequest
Partition
PartitionResponse
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, 0x05, 0x3b, 0xef, 0x4f,
0xd9, 0x5f, 0x35, 0x92, 0xa6, 0x63, 0x20, 0x6c, 0xde, 0x12, 0x3e, 0xbf, 0xcf, 0xf7, 0x9b, 0x26,
0x45, 0x67, 0x29, 0xe7, 0x29, 0x85, 0x40, 0x0a, 0xc2,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