forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
query.pb.go
4373 lines (3956 loc) · 165 KB
/
query.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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: query.proto
package query // import "vitess.io/vitess/go/vt/proto/query"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import topodata "vitess.io/vitess/go/vt/proto/topodata"
import vtrpc "vitess.io/vitess/go/vt/proto/vtrpc"
// 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
// Flags sent from the MySQL C API
type MySqlFlag int32
const (
MySqlFlag_EMPTY MySqlFlag = 0
MySqlFlag_NOT_NULL_FLAG MySqlFlag = 1
MySqlFlag_PRI_KEY_FLAG MySqlFlag = 2
MySqlFlag_UNIQUE_KEY_FLAG MySqlFlag = 4
MySqlFlag_MULTIPLE_KEY_FLAG MySqlFlag = 8
MySqlFlag_BLOB_FLAG MySqlFlag = 16
MySqlFlag_UNSIGNED_FLAG MySqlFlag = 32
MySqlFlag_ZEROFILL_FLAG MySqlFlag = 64
MySqlFlag_BINARY_FLAG MySqlFlag = 128
MySqlFlag_ENUM_FLAG MySqlFlag = 256
MySqlFlag_AUTO_INCREMENT_FLAG MySqlFlag = 512
MySqlFlag_TIMESTAMP_FLAG MySqlFlag = 1024
MySqlFlag_SET_FLAG MySqlFlag = 2048
MySqlFlag_NO_DEFAULT_VALUE_FLAG MySqlFlag = 4096
MySqlFlag_ON_UPDATE_NOW_FLAG MySqlFlag = 8192
MySqlFlag_NUM_FLAG MySqlFlag = 32768
MySqlFlag_PART_KEY_FLAG MySqlFlag = 16384
MySqlFlag_GROUP_FLAG MySqlFlag = 32768
MySqlFlag_UNIQUE_FLAG MySqlFlag = 65536
MySqlFlag_BINCMP_FLAG MySqlFlag = 131072
)
var MySqlFlag_name = map[int32]string{
0: "EMPTY",
1: "NOT_NULL_FLAG",
2: "PRI_KEY_FLAG",
4: "UNIQUE_KEY_FLAG",
8: "MULTIPLE_KEY_FLAG",
16: "BLOB_FLAG",
32: "UNSIGNED_FLAG",
64: "ZEROFILL_FLAG",
128: "BINARY_FLAG",
256: "ENUM_FLAG",
512: "AUTO_INCREMENT_FLAG",
1024: "TIMESTAMP_FLAG",
2048: "SET_FLAG",
4096: "NO_DEFAULT_VALUE_FLAG",
8192: "ON_UPDATE_NOW_FLAG",
32768: "NUM_FLAG",
16384: "PART_KEY_FLAG",
// Duplicate value: 32768: "GROUP_FLAG",
65536: "UNIQUE_FLAG",
131072: "BINCMP_FLAG",
}
var MySqlFlag_value = map[string]int32{
"EMPTY": 0,
"NOT_NULL_FLAG": 1,
"PRI_KEY_FLAG": 2,
"UNIQUE_KEY_FLAG": 4,
"MULTIPLE_KEY_FLAG": 8,
"BLOB_FLAG": 16,
"UNSIGNED_FLAG": 32,
"ZEROFILL_FLAG": 64,
"BINARY_FLAG": 128,
"ENUM_FLAG": 256,
"AUTO_INCREMENT_FLAG": 512,
"TIMESTAMP_FLAG": 1024,
"SET_FLAG": 2048,
"NO_DEFAULT_VALUE_FLAG": 4096,
"ON_UPDATE_NOW_FLAG": 8192,
"NUM_FLAG": 32768,
"PART_KEY_FLAG": 16384,
"GROUP_FLAG": 32768,
"UNIQUE_FLAG": 65536,
"BINCMP_FLAG": 131072,
}
func (x MySqlFlag) String() string {
return proto.EnumName(MySqlFlag_name, int32(x))
}
func (MySqlFlag) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{0}
}
// Flag allows us to qualify types by their common properties.
type Flag int32
const (
Flag_NONE Flag = 0
Flag_ISINTEGRAL Flag = 256
Flag_ISUNSIGNED Flag = 512
Flag_ISFLOAT Flag = 1024
Flag_ISQUOTED Flag = 2048
Flag_ISTEXT Flag = 4096
Flag_ISBINARY Flag = 8192
)
var Flag_name = map[int32]string{
0: "NONE",
256: "ISINTEGRAL",
512: "ISUNSIGNED",
1024: "ISFLOAT",
2048: "ISQUOTED",
4096: "ISTEXT",
8192: "ISBINARY",
}
var Flag_value = map[string]int32{
"NONE": 0,
"ISINTEGRAL": 256,
"ISUNSIGNED": 512,
"ISFLOAT": 1024,
"ISQUOTED": 2048,
"ISTEXT": 4096,
"ISBINARY": 8192,
}
func (x Flag) String() string {
return proto.EnumName(Flag_name, int32(x))
}
func (Flag) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{1}
}
// Type defines the various supported data types in bind vars
// and query results.
type Type int32
const (
// NULL_TYPE specifies a NULL type.
Type_NULL_TYPE Type = 0
// INT8 specifies a TINYINT type.
// Properties: 1, IsNumber.
Type_INT8 Type = 257
// UINT8 specifies a TINYINT UNSIGNED type.
// Properties: 2, IsNumber, IsUnsigned.
Type_UINT8 Type = 770
// INT16 specifies a SMALLINT type.
// Properties: 3, IsNumber.
Type_INT16 Type = 259
// UINT16 specifies a SMALLINT UNSIGNED type.
// Properties: 4, IsNumber, IsUnsigned.
Type_UINT16 Type = 772
// INT24 specifies a MEDIUMINT type.
// Properties: 5, IsNumber.
Type_INT24 Type = 261
// UINT24 specifies a MEDIUMINT UNSIGNED type.
// Properties: 6, IsNumber, IsUnsigned.
Type_UINT24 Type = 774
// INT32 specifies a INTEGER type.
// Properties: 7, IsNumber.
Type_INT32 Type = 263
// UINT32 specifies a INTEGER UNSIGNED type.
// Properties: 8, IsNumber, IsUnsigned.
Type_UINT32 Type = 776
// INT64 specifies a BIGINT type.
// Properties: 9, IsNumber.
Type_INT64 Type = 265
// UINT64 specifies a BIGINT UNSIGNED type.
// Properties: 10, IsNumber, IsUnsigned.
Type_UINT64 Type = 778
// FLOAT32 specifies a FLOAT type.
// Properties: 11, IsFloat.
Type_FLOAT32 Type = 1035
// FLOAT64 specifies a DOUBLE or REAL type.
// Properties: 12, IsFloat.
Type_FLOAT64 Type = 1036
// TIMESTAMP specifies a TIMESTAMP type.
// Properties: 13, IsQuoted.
Type_TIMESTAMP Type = 2061
// DATE specifies a DATE type.
// Properties: 14, IsQuoted.
Type_DATE Type = 2062
// TIME specifies a TIME type.
// Properties: 15, IsQuoted.
Type_TIME Type = 2063
// DATETIME specifies a DATETIME type.
// Properties: 16, IsQuoted.
Type_DATETIME Type = 2064
// YEAR specifies a YEAR type.
// Properties: 17, IsNumber, IsUnsigned.
Type_YEAR Type = 785
// DECIMAL specifies a DECIMAL or NUMERIC type.
// Properties: 18, None.
Type_DECIMAL Type = 18
// TEXT specifies a TEXT type.
// Properties: 19, IsQuoted, IsText.
Type_TEXT Type = 6163
// BLOB specifies a BLOB type.
// Properties: 20, IsQuoted, IsBinary.
Type_BLOB Type = 10260
// VARCHAR specifies a VARCHAR type.
// Properties: 21, IsQuoted, IsText.
Type_VARCHAR Type = 6165
// VARBINARY specifies a VARBINARY type.
// Properties: 22, IsQuoted, IsBinary.
Type_VARBINARY Type = 10262
// CHAR specifies a CHAR type.
// Properties: 23, IsQuoted, IsText.
Type_CHAR Type = 6167
// BINARY specifies a BINARY type.
// Properties: 24, IsQuoted, IsBinary.
Type_BINARY Type = 10264
// BIT specifies a BIT type.
// Properties: 25, IsQuoted.
Type_BIT Type = 2073
// ENUM specifies an ENUM type.
// Properties: 26, IsQuoted.
Type_ENUM Type = 2074
// SET specifies a SET type.
// Properties: 27, IsQuoted.
Type_SET Type = 2075
// TUPLE specifies a a tuple. This cannot
// be returned in a QueryResult, but it can
// be sent as a bind var.
// Properties: 28, None.
Type_TUPLE Type = 28
// GEOMETRY specifies a GEOMETRY type.
// Properties: 29, IsQuoted.
Type_GEOMETRY Type = 2077
// JSON specifies a JSON type.
// Properties: 30, IsQuoted.
Type_JSON Type = 2078
// EXPRESSION specifies a SQL expression.
// This type is for internal use only.
// Properties: 31, None.
Type_EXPRESSION Type = 31
)
var Type_name = map[int32]string{
0: "NULL_TYPE",
257: "INT8",
770: "UINT8",
259: "INT16",
772: "UINT16",
261: "INT24",
774: "UINT24",
263: "INT32",
776: "UINT32",
265: "INT64",
778: "UINT64",
1035: "FLOAT32",
1036: "FLOAT64",
2061: "TIMESTAMP",
2062: "DATE",
2063: "TIME",
2064: "DATETIME",
785: "YEAR",
18: "DECIMAL",
6163: "TEXT",
10260: "BLOB",
6165: "VARCHAR",
10262: "VARBINARY",
6167: "CHAR",
10264: "BINARY",
2073: "BIT",
2074: "ENUM",
2075: "SET",
28: "TUPLE",
2077: "GEOMETRY",
2078: "JSON",
31: "EXPRESSION",
}
var Type_value = map[string]int32{
"NULL_TYPE": 0,
"INT8": 257,
"UINT8": 770,
"INT16": 259,
"UINT16": 772,
"INT24": 261,
"UINT24": 774,
"INT32": 263,
"UINT32": 776,
"INT64": 265,
"UINT64": 778,
"FLOAT32": 1035,
"FLOAT64": 1036,
"TIMESTAMP": 2061,
"DATE": 2062,
"TIME": 2063,
"DATETIME": 2064,
"YEAR": 785,
"DECIMAL": 18,
"TEXT": 6163,
"BLOB": 10260,
"VARCHAR": 6165,
"VARBINARY": 10262,
"CHAR": 6167,
"BINARY": 10264,
"BIT": 2073,
"ENUM": 2074,
"SET": 2075,
"TUPLE": 28,
"GEOMETRY": 2077,
"JSON": 2078,
"EXPRESSION": 31,
}
func (x Type) String() string {
return proto.EnumName(Type_name, int32(x))
}
func (Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{2}
}
// TransactionState represents the state of a distributed transaction.
type TransactionState int32
const (
TransactionState_UNKNOWN TransactionState = 0
TransactionState_PREPARE TransactionState = 1
TransactionState_COMMIT TransactionState = 2
TransactionState_ROLLBACK TransactionState = 3
)
var TransactionState_name = map[int32]string{
0: "UNKNOWN",
1: "PREPARE",
2: "COMMIT",
3: "ROLLBACK",
}
var TransactionState_value = map[string]int32{
"UNKNOWN": 0,
"PREPARE": 1,
"COMMIT": 2,
"ROLLBACK": 3,
}
func (x TransactionState) String() string {
return proto.EnumName(TransactionState_name, int32(x))
}
func (TransactionState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{3}
}
type ExecuteOptions_IncludedFields int32
const (
ExecuteOptions_TYPE_AND_NAME ExecuteOptions_IncludedFields = 0
ExecuteOptions_TYPE_ONLY ExecuteOptions_IncludedFields = 1
ExecuteOptions_ALL ExecuteOptions_IncludedFields = 2
)
var ExecuteOptions_IncludedFields_name = map[int32]string{
0: "TYPE_AND_NAME",
1: "TYPE_ONLY",
2: "ALL",
}
var ExecuteOptions_IncludedFields_value = map[string]int32{
"TYPE_AND_NAME": 0,
"TYPE_ONLY": 1,
"ALL": 2,
}
func (x ExecuteOptions_IncludedFields) String() string {
return proto.EnumName(ExecuteOptions_IncludedFields_name, int32(x))
}
func (ExecuteOptions_IncludedFields) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{6, 0}
}
type ExecuteOptions_Workload int32
const (
ExecuteOptions_UNSPECIFIED ExecuteOptions_Workload = 0
ExecuteOptions_OLTP ExecuteOptions_Workload = 1
ExecuteOptions_OLAP ExecuteOptions_Workload = 2
ExecuteOptions_DBA ExecuteOptions_Workload = 3
)
var ExecuteOptions_Workload_name = map[int32]string{
0: "UNSPECIFIED",
1: "OLTP",
2: "OLAP",
3: "DBA",
}
var ExecuteOptions_Workload_value = map[string]int32{
"UNSPECIFIED": 0,
"OLTP": 1,
"OLAP": 2,
"DBA": 3,
}
func (x ExecuteOptions_Workload) String() string {
return proto.EnumName(ExecuteOptions_Workload_name, int32(x))
}
func (ExecuteOptions_Workload) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{6, 1}
}
type ExecuteOptions_TransactionIsolation int32
const (
ExecuteOptions_DEFAULT ExecuteOptions_TransactionIsolation = 0
ExecuteOptions_REPEATABLE_READ ExecuteOptions_TransactionIsolation = 1
ExecuteOptions_READ_COMMITTED ExecuteOptions_TransactionIsolation = 2
ExecuteOptions_READ_UNCOMMITTED ExecuteOptions_TransactionIsolation = 3
ExecuteOptions_SERIALIZABLE ExecuteOptions_TransactionIsolation = 4
)
var ExecuteOptions_TransactionIsolation_name = map[int32]string{
0: "DEFAULT",
1: "REPEATABLE_READ",
2: "READ_COMMITTED",
3: "READ_UNCOMMITTED",
4: "SERIALIZABLE",
}
var ExecuteOptions_TransactionIsolation_value = map[string]int32{
"DEFAULT": 0,
"REPEATABLE_READ": 1,
"READ_COMMITTED": 2,
"READ_UNCOMMITTED": 3,
"SERIALIZABLE": 4,
}
func (x ExecuteOptions_TransactionIsolation) String() string {
return proto.EnumName(ExecuteOptions_TransactionIsolation_name, int32(x))
}
func (ExecuteOptions_TransactionIsolation) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{6, 2}
}
// The category of one statement.
type StreamEvent_Statement_Category int32
const (
StreamEvent_Statement_Error StreamEvent_Statement_Category = 0
StreamEvent_Statement_DML StreamEvent_Statement_Category = 1
StreamEvent_Statement_DDL StreamEvent_Statement_Category = 2
)
var StreamEvent_Statement_Category_name = map[int32]string{
0: "Error",
1: "DML",
2: "DDL",
}
var StreamEvent_Statement_Category_value = map[string]int32{
"Error": 0,
"DML": 1,
"DDL": 2,
}
func (x StreamEvent_Statement_Category) String() string {
return proto.EnumName(StreamEvent_Statement_Category_name, int32(x))
}
func (StreamEvent_Statement_Category) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{12, 0, 0}
}
type SplitQueryRequest_Algorithm int32
const (
SplitQueryRequest_EQUAL_SPLITS SplitQueryRequest_Algorithm = 0
SplitQueryRequest_FULL_SCAN SplitQueryRequest_Algorithm = 1
)
var SplitQueryRequest_Algorithm_name = map[int32]string{
0: "EQUAL_SPLITS",
1: "FULL_SCAN",
}
var SplitQueryRequest_Algorithm_value = map[string]int32{
"EQUAL_SPLITS": 0,
"FULL_SCAN": 1,
}
func (x SplitQueryRequest_Algorithm) String() string {
return proto.EnumName(SplitQueryRequest_Algorithm_name, int32(x))
}
func (SplitQueryRequest_Algorithm) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{50, 0}
}
// Target describes what the client expects the tablet is.
// If the tablet does not match, an error is returned.
type Target struct {
Keyspace string `protobuf:"bytes,1,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"`
TabletType topodata.TabletType `protobuf:"varint,3,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
// cell is used for routing queries between vtgate and vttablets. It
// is not used when Target is part of the Session sent by the client.
Cell string `protobuf:"bytes,4,opt,name=cell,proto3" json:"cell,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Target) Reset() { *m = Target{} }
func (m *Target) String() string { return proto.CompactTextString(m) }
func (*Target) ProtoMessage() {}
func (*Target) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{0}
}
func (m *Target) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Target.Unmarshal(m, b)
}
func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Target.Marshal(b, m, deterministic)
}
func (dst *Target) XXX_Merge(src proto.Message) {
xxx_messageInfo_Target.Merge(dst, src)
}
func (m *Target) XXX_Size() int {
return xxx_messageInfo_Target.Size(m)
}
func (m *Target) XXX_DiscardUnknown() {
xxx_messageInfo_Target.DiscardUnknown(m)
}
var xxx_messageInfo_Target proto.InternalMessageInfo
func (m *Target) GetKeyspace() string {
if m != nil {
return m.Keyspace
}
return ""
}
func (m *Target) GetShard() string {
if m != nil {
return m.Shard
}
return ""
}
func (m *Target) GetTabletType() topodata.TabletType {
if m != nil {
return m.TabletType
}
return topodata.TabletType_UNKNOWN
}
func (m *Target) GetCell() string {
if m != nil {
return m.Cell
}
return ""
}
// VTGateCallerID is sent by VTGate to VTTablet to describe the
// caller. If possible, this information is secure. For instance,
// if using unique certificates that guarantee that VTGate->VTTablet
// traffic cannot be spoofed, then VTTablet can trust this information,
// and VTTablet will use it for tablet ACLs, for instance.
// Because of this security guarantee, this is different than the CallerID
// structure, which is not secure at all, because it is provided
// by the Vitess client.
type VTGateCallerID struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Groups []string `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VTGateCallerID) Reset() { *m = VTGateCallerID{} }
func (m *VTGateCallerID) String() string { return proto.CompactTextString(m) }
func (*VTGateCallerID) ProtoMessage() {}
func (*VTGateCallerID) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{1}
}
func (m *VTGateCallerID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VTGateCallerID.Unmarshal(m, b)
}
func (m *VTGateCallerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VTGateCallerID.Marshal(b, m, deterministic)
}
func (dst *VTGateCallerID) XXX_Merge(src proto.Message) {
xxx_messageInfo_VTGateCallerID.Merge(dst, src)
}
func (m *VTGateCallerID) XXX_Size() int {
return xxx_messageInfo_VTGateCallerID.Size(m)
}
func (m *VTGateCallerID) XXX_DiscardUnknown() {
xxx_messageInfo_VTGateCallerID.DiscardUnknown(m)
}
var xxx_messageInfo_VTGateCallerID proto.InternalMessageInfo
func (m *VTGateCallerID) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
func (m *VTGateCallerID) GetGroups() []string {
if m != nil {
return m.Groups
}
return nil
}
// EventToken is a structure that describes a point in time in a
// replication stream on one shard. The most recent known replication
// position can be retrieved from vttablet when executing a query. It
// is also sent with the replication streams from the binlog service.
type EventToken struct {
// timestamp is the MySQL timestamp of the statements. Seconds since Epoch.
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The shard name that applied the statements. Note this is not set when
// streaming from a vttablet. It is only used on the client -> vtgate link.
Shard string `protobuf:"bytes,2,opt,name=shard,proto3" json:"shard,omitempty"`
// The position on the replication stream after this statement was applied.
// It is not the transaction ID / GTID, but the position / GTIDSet.
Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EventToken) Reset() { *m = EventToken{} }
func (m *EventToken) String() string { return proto.CompactTextString(m) }
func (*EventToken) ProtoMessage() {}
func (*EventToken) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{2}
}
func (m *EventToken) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EventToken.Unmarshal(m, b)
}
func (m *EventToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EventToken.Marshal(b, m, deterministic)
}
func (dst *EventToken) XXX_Merge(src proto.Message) {
xxx_messageInfo_EventToken.Merge(dst, src)
}
func (m *EventToken) XXX_Size() int {
return xxx_messageInfo_EventToken.Size(m)
}
func (m *EventToken) XXX_DiscardUnknown() {
xxx_messageInfo_EventToken.DiscardUnknown(m)
}
var xxx_messageInfo_EventToken proto.InternalMessageInfo
func (m *EventToken) GetTimestamp() int64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *EventToken) GetShard() string {
if m != nil {
return m.Shard
}
return ""
}
func (m *EventToken) GetPosition() string {
if m != nil {
return m.Position
}
return ""
}
// Value represents a typed value.
type Value struct {
Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Value) Reset() { *m = Value{} }
func (m *Value) String() string { return proto.CompactTextString(m) }
func (*Value) ProtoMessage() {}
func (*Value) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{3}
}
func (m *Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Value.Unmarshal(m, b)
}
func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Value.Marshal(b, m, deterministic)
}
func (dst *Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_Value.Merge(dst, src)
}
func (m *Value) XXX_Size() int {
return xxx_messageInfo_Value.Size(m)
}
func (m *Value) XXX_DiscardUnknown() {
xxx_messageInfo_Value.DiscardUnknown(m)
}
var xxx_messageInfo_Value proto.InternalMessageInfo
func (m *Value) GetType() Type {
if m != nil {
return m.Type
}
return Type_NULL_TYPE
}
func (m *Value) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
// BindVariable represents a single bind variable in a Query.
type BindVariable struct {
Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// values are set if type is TUPLE.
Values []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BindVariable) Reset() { *m = BindVariable{} }
func (m *BindVariable) String() string { return proto.CompactTextString(m) }
func (*BindVariable) ProtoMessage() {}
func (*BindVariable) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{4}
}
func (m *BindVariable) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BindVariable.Unmarshal(m, b)
}
func (m *BindVariable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BindVariable.Marshal(b, m, deterministic)
}
func (dst *BindVariable) XXX_Merge(src proto.Message) {
xxx_messageInfo_BindVariable.Merge(dst, src)
}
func (m *BindVariable) XXX_Size() int {
return xxx_messageInfo_BindVariable.Size(m)
}
func (m *BindVariable) XXX_DiscardUnknown() {
xxx_messageInfo_BindVariable.DiscardUnknown(m)
}
var xxx_messageInfo_BindVariable proto.InternalMessageInfo
func (m *BindVariable) GetType() Type {
if m != nil {
return m.Type
}
return Type_NULL_TYPE
}
func (m *BindVariable) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *BindVariable) GetValues() []*Value {
if m != nil {
return m.Values
}
return nil
}
// BoundQuery is a query with its bind variables
type BoundQuery struct {
// sql is the SQL query to execute
Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"`
// bind_variables is a map of all bind variables to expand in the query.
// nil values are not allowed. Use NULL_TYPE to express a NULL value.
BindVariables map[string]*BindVariable `protobuf:"bytes,2,rep,name=bind_variables,json=bindVariables,proto3" json:"bind_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BoundQuery) Reset() { *m = BoundQuery{} }
func (m *BoundQuery) String() string { return proto.CompactTextString(m) }
func (*BoundQuery) ProtoMessage() {}
func (*BoundQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{5}
}
func (m *BoundQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BoundQuery.Unmarshal(m, b)
}
func (m *BoundQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BoundQuery.Marshal(b, m, deterministic)
}
func (dst *BoundQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_BoundQuery.Merge(dst, src)
}
func (m *BoundQuery) XXX_Size() int {
return xxx_messageInfo_BoundQuery.Size(m)
}
func (m *BoundQuery) XXX_DiscardUnknown() {
xxx_messageInfo_BoundQuery.DiscardUnknown(m)
}
var xxx_messageInfo_BoundQuery proto.InternalMessageInfo
func (m *BoundQuery) GetSql() string {
if m != nil {
return m.Sql
}
return ""
}
func (m *BoundQuery) GetBindVariables() map[string]*BindVariable {
if m != nil {
return m.BindVariables
}
return nil
}
// ExecuteOptions is passed around for all Execute calls.
type ExecuteOptions struct {
// If set, we will try to include an EventToken with the responses.
IncludeEventToken bool `protobuf:"varint,2,opt,name=include_event_token,json=includeEventToken,proto3" json:"include_event_token,omitempty"`
// If set, the fresher field may be set as a result comparison to this token.
// This is a shortcut so the application doesn't need to care about
// comparing EventTokens.
CompareEventToken *EventToken `protobuf:"bytes,3,opt,name=compare_event_token,json=compareEventToken,proto3" json:"compare_event_token,omitempty"`
// Controls what fields are returned in Field message responses from mysql, i.e.
// field name, table name, etc. This is an optimization for high-QPS queries where
// the client knows what it's getting
IncludedFields ExecuteOptions_IncludedFields `protobuf:"varint,4,opt,name=included_fields,json=includedFields,proto3,enum=query.ExecuteOptions_IncludedFields" json:"included_fields,omitempty"`
// client_rows_found specifies if rows_affected should return
// rows found instead of rows affected. Behavior is defined
// by MySQL's CLIENT_FOUND_ROWS flag.
ClientFoundRows bool `protobuf:"varint,5,opt,name=client_found_rows,json=clientFoundRows,proto3" json:"client_found_rows,omitempty"`
// workload specifies the type of workload:
// OLTP: DMLs allowed, results have row count limit, and
// query timeouts are shorter.
// OLAP: DMLS not allowed, no limit on row count, timeouts
// can be as high as desired.
// DBA: no limit on rowcount or timeout, all queries allowed
// but intended for long DMLs and DDLs.
Workload ExecuteOptions_Workload `protobuf:"varint,6,opt,name=workload,proto3,enum=query.ExecuteOptions_Workload" json:"workload,omitempty"`
// sql_select_limit sets an implicit limit on all select statements. Since
// vitess also sets a rowcount limit on queries, the smallest value wins.
SqlSelectLimit int64 `protobuf:"varint,8,opt,name=sql_select_limit,json=sqlSelectLimit,proto3" json:"sql_select_limit,omitempty"`
TransactionIsolation ExecuteOptions_TransactionIsolation `protobuf:"varint,9,opt,name=transaction_isolation,json=transactionIsolation,proto3,enum=query.ExecuteOptions_TransactionIsolation" json:"transaction_isolation,omitempty"`
// skip_query_plan_cache specifies if the query plan shoud be cached by vitess.
// By default all query plans are cached.
SkipQueryPlanCache bool `protobuf:"varint,10,opt,name=skip_query_plan_cache,json=skipQueryPlanCache,proto3" json:"skip_query_plan_cache,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExecuteOptions) Reset() { *m = ExecuteOptions{} }
func (m *ExecuteOptions) String() string { return proto.CompactTextString(m) }
func (*ExecuteOptions) ProtoMessage() {}
func (*ExecuteOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{6}
}
func (m *ExecuteOptions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExecuteOptions.Unmarshal(m, b)
}
func (m *ExecuteOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExecuteOptions.Marshal(b, m, deterministic)
}
func (dst *ExecuteOptions) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExecuteOptions.Merge(dst, src)
}
func (m *ExecuteOptions) XXX_Size() int {
return xxx_messageInfo_ExecuteOptions.Size(m)
}
func (m *ExecuteOptions) XXX_DiscardUnknown() {
xxx_messageInfo_ExecuteOptions.DiscardUnknown(m)
}
var xxx_messageInfo_ExecuteOptions proto.InternalMessageInfo
func (m *ExecuteOptions) GetIncludeEventToken() bool {
if m != nil {
return m.IncludeEventToken
}
return false
}
func (m *ExecuteOptions) GetCompareEventToken() *EventToken {
if m != nil {
return m.CompareEventToken
}
return nil
}
func (m *ExecuteOptions) GetIncludedFields() ExecuteOptions_IncludedFields {
if m != nil {
return m.IncludedFields
}
return ExecuteOptions_TYPE_AND_NAME
}
func (m *ExecuteOptions) GetClientFoundRows() bool {
if m != nil {
return m.ClientFoundRows
}
return false
}
func (m *ExecuteOptions) GetWorkload() ExecuteOptions_Workload {
if m != nil {
return m.Workload
}
return ExecuteOptions_UNSPECIFIED
}
func (m *ExecuteOptions) GetSqlSelectLimit() int64 {
if m != nil {
return m.SqlSelectLimit
}
return 0
}
func (m *ExecuteOptions) GetTransactionIsolation() ExecuteOptions_TransactionIsolation {
if m != nil {
return m.TransactionIsolation
}
return ExecuteOptions_DEFAULT
}
func (m *ExecuteOptions) GetSkipQueryPlanCache() bool {
if m != nil {
return m.SkipQueryPlanCache
}
return false
}
// Field describes a single column returned by a query
type Field struct {
// name of the field as returned by mysql C API
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// vitess-defined type. Conversion function is in sqltypes package.
Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=query.Type" json:"type,omitempty"`
// Remaining fields from mysql C API.
// These fields are only populated when ExecuteOptions.included_fields
// is set to IncludedFields.ALL.
Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"`
OrgTable string `protobuf:"bytes,4,opt,name=org_table,json=orgTable,proto3" json:"org_table,omitempty"`
Database string `protobuf:"bytes,5,opt,name=database,proto3" json:"database,omitempty"`
OrgName string `protobuf:"bytes,6,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"`
// column_length is really a uint32. All 32 bits can be used.
ColumnLength uint32 `protobuf:"varint,7,opt,name=column_length,json=columnLength,proto3" json:"column_length,omitempty"`
// charset is actually a uint16. Only the lower 16 bits are used.
Charset uint32 `protobuf:"varint,8,opt,name=charset,proto3" json:"charset,omitempty"`
// decimals is actualy a uint8. Only the lower 8 bits are used.
Decimals uint32 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"`
// flags is actually a uint16. Only the lower 16 bits are used.
Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Field) Reset() { *m = Field{} }
func (m *Field) String() string { return proto.CompactTextString(m) }
func (*Field) ProtoMessage() {}
func (*Field) Descriptor() ([]byte, []int) {
return fileDescriptor_query_9111254583ad7475, []int{7}
}
func (m *Field) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Field.Unmarshal(m, b)
}
func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Field.Marshal(b, m, deterministic)
}
func (dst *Field) XXX_Merge(src proto.Message) {
xxx_messageInfo_Field.Merge(dst, src)
}
func (m *Field) XXX_Size() int {
return xxx_messageInfo_Field.Size(m)
}
func (m *Field) XXX_DiscardUnknown() {
xxx_messageInfo_Field.DiscardUnknown(m)
}
var xxx_messageInfo_Field proto.InternalMessageInfo
func (m *Field) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Field) GetType() Type {
if m != nil {
return m.Type
}