forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysqlx_resultset.pb.go
1650 lines (1589 loc) · 45.6 KB
/
mysqlx_resultset.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-gogo. DO NOT EDIT.
// source: github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.proto
/*
Package Mysqlx_Resultset is a generated protocol buffer package.
It is generated from these files:
github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.proto
It has these top-level messages:
FetchDoneMoreOutParams
FetchDoneMoreResultsets
FetchDone
ColumnMetaData
Row
*/
package Mysqlx_Resultset
import (
"fmt"
proto "github.com/golang/protobuf/proto"
math "math"
github_com_golang_protobuf_proto "github.com/golang/protobuf/proto"
io "io"
)
// 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
type ColumnMetaData_FieldType int32
const (
ColumnMetaData_SINT ColumnMetaData_FieldType = 1
ColumnMetaData_UINT ColumnMetaData_FieldType = 2
ColumnMetaData_DOUBLE ColumnMetaData_FieldType = 5
ColumnMetaData_FLOAT ColumnMetaData_FieldType = 6
ColumnMetaData_BYTES ColumnMetaData_FieldType = 7
ColumnMetaData_TIME ColumnMetaData_FieldType = 10
ColumnMetaData_DATETIME ColumnMetaData_FieldType = 12
ColumnMetaData_SET ColumnMetaData_FieldType = 15
ColumnMetaData_ENUM ColumnMetaData_FieldType = 16
ColumnMetaData_BIT ColumnMetaData_FieldType = 17
ColumnMetaData_DECIMAL ColumnMetaData_FieldType = 18
)
var ColumnMetaData_FieldType_name = map[int32]string{
1: "SINT",
2: "UINT",
5: "DOUBLE",
6: "FLOAT",
7: "BYTES",
10: "TIME",
12: "DATETIME",
15: "SET",
16: "ENUM",
17: "BIT",
18: "DECIMAL",
}
var ColumnMetaData_FieldType_value = map[string]int32{
"SINT": 1,
"UINT": 2,
"DOUBLE": 5,
"FLOAT": 6,
"BYTES": 7,
"TIME": 10,
"DATETIME": 12,
"SET": 15,
"ENUM": 16,
"BIT": 17,
"DECIMAL": 18,
}
func (x ColumnMetaData_FieldType) Enum() *ColumnMetaData_FieldType {
p := new(ColumnMetaData_FieldType)
*p = x
return p
}
func (x ColumnMetaData_FieldType) String() string {
return proto.EnumName(ColumnMetaData_FieldType_name, int32(x))
}
func (x *ColumnMetaData_FieldType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ColumnMetaData_FieldType_value, data, "ColumnMetaData_FieldType")
if err != nil {
return err
}
*x = ColumnMetaData_FieldType(value)
return nil
}
func (ColumnMetaData_FieldType) EnumDescriptor() ([]byte, []int) {
return fileDescriptorMysqlxResultset, []int{3, 0}
}
// resultsets are finished, OUT paramset is next
type FetchDoneMoreOutParams struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *FetchDoneMoreOutParams) Reset() { *m = FetchDoneMoreOutParams{} }
func (m *FetchDoneMoreOutParams) String() string { return proto.CompactTextString(m) }
func (*FetchDoneMoreOutParams) ProtoMessage() {}
func (*FetchDoneMoreOutParams) Descriptor() ([]byte, []int) {
return fileDescriptorMysqlxResultset, []int{0}
}
// resultset and out-params are finished, but more resultsets available
type FetchDoneMoreResultsets struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *FetchDoneMoreResultsets) Reset() { *m = FetchDoneMoreResultsets{} }
func (m *FetchDoneMoreResultsets) String() string { return proto.CompactTextString(m) }
func (*FetchDoneMoreResultsets) ProtoMessage() {}
func (*FetchDoneMoreResultsets) Descriptor() ([]byte, []int) {
return fileDescriptorMysqlxResultset, []int{1}
}
// all resultsets are finished
type FetchDone struct {
XXX_unrecognized []byte `json:"-"`
}
func (m *FetchDone) Reset() { *m = FetchDone{} }
func (m *FetchDone) String() string { return proto.CompactTextString(m) }
func (*FetchDone) ProtoMessage() {}
func (*FetchDone) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{2} }
// meta data of a Column
//
// .. note:: the encoding used for the different ``bytes`` fields in the meta data is externally
// controlled.
// .. seealso:: https://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
//
// .. note::
// The server may not set the ``original_{table|name}`` fields if they are equal to the plain
// ``{table|name}`` field.
//
// A client has to reconstruct it like::
//
// if .original_name is empty and .name is not empty:
// .original_name = .name
//
// if .original_table is empty and .table is not empty:
// .original_table = .table
//
// .. note::
// ``compact metadata format`` can be requested by the client. In that case only ``.type`` is set and
// all other fields are empty.
//
//
// :param type:
// .. table:: Expected Datatype of Mysqlx.Resultset.Row per SQL Type for non NULL values
//
// ================= ============ ======= ========== ====== ========
// SQL Type .type .length .frac_dig .flags .charset
// ================= ============ ======= ========== ====== ========
// TINY SINT x
// TINY UNSIGNED UINT x x
// SHORT SINT x
// SHORT UNSIGNED UINT x x
// INT24 SINT x
// INT24 UNSIGNED UINT x x
// INT SINT x
// INT UNSIGNED UINT x x
// LONGLONG SINT x
// LONGLONG UNSIGNED UINT x x
// DOUBLE DOUBLE x x x
// FLOAT FLOAT x x x
// DECIMAL DECIMAL x x x
// VARCHAR,CHAR,... BYTES x x x
// GEOMETRY BYTES
// TIME TIME x
// DATE DATETIME x
// DATETIME DATETIME x
// YEAR UINT x x
// TIMESTAMP DATETIME x
// SET SET x
// ENUM ENUM x
// NULL BYTES
// BIT BIT x
// ================= ============ ======= ========== ====== ========
//
// .. note:: the SQL "NULL" value is sent as an empty field value in :protobuf:msg:`Mysqlx.Resultset::Row`
// .. seealso:: protobuf encoding of primitive datatypes are decribed in https://developers.google.com/protocol-buffers/docs/encoding
//
// SINT
//
// ``.length``
// maximum number of displayable decimal digits (including minus sign) of the type
//
// .. note::
// valid range is 0-255, but usually you'll see 1-20
//
// =============== ==
// SQL Type max digits per type
// =============== ==
// TINY SIGNED 4
// SHORT SIGNED 6
// INT24 SIGNED 8
// INT SIGNED 11
// LONGLONG SIGNED 20
// =============== ==
//
// .. seealso:: definition of ``M`` in https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
//
// ``value``
// variable length encoded signed 64 integer
//
// UINT
//
// ``.flags & 1`` (zerofill)
// the client has to left pad with 0's up to .length
//
// ``.length``
// maximum number of displayable decimal digits of the type
//
// .. note::
// valid range is 0-255, but usually you'll see 1-20
//
// ================= ==
// SQL Type max digits per type
// ================= ==
// TINY UNSIGNED 3
// SHORT UNSIGNED 5
// INT24 UNSIGNED 8
// INT UNSIGNED 10
// LONGLONG UNSIGNED 20
// ================= ==
//
// .. seealso:: definition of ``M`` in https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
//
// ``value``
// variable length encoded unsigned 64 integer
//
// BIT
//
// ``.length``
// maximum number of displayable binary digits
//
// .. note:: valid range for M of the ``BIT`` type is 1 - 64
// .. seealso:: https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
//
// ``value``
// variable length encoded unsigned 64 integer
//
// DOUBLE
//
// ``.length``
// maximum number of displayable decimal digits (including the decimal point and ``.fractional_digits``)
//
// ``.fractional_digits``
// maximum number of displayable decimal digits following the decimal point
//
// ``value``
// encoded as Protobuf's 'double'
//
// FLOAT
//
// ``.length``
// maximum number of displayable decimal digits (including the decimal point and ``.fractional_digits``)
//
// ``.fractional_digits``
// maximum number of displayable decimal digits following the decimal point
//
// ``value``
// encoded as Protobuf's 'float'
//
// BYTES, ENUM
// BYTES is used for all opaque byte strings that may have a charset
//
// * TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB
// * TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT
// * VARCHAR, VARBINARY
// * CHAR, BINARY
// * ENUM
//
// ``.length``
// the maximum length of characters of the underlying type
//
// ``.flags & 1`` (rightpad)
// if the length of the field is less than ``.length``, the receiver is
// supposed to add padding characters to the right end of the string.
// If the ``.charset`` is "binary", the padding character is ``0x00``,
// otherwise it is a space character as defined by that character set.
//
// ============= ======= ======== =======
// SQL Type .length .charset .flags
// ============= ======= ======== =======
// TINYBLOB 256 binary
// BLOB 65535 binary
// VARCHAR(32) 32 utf8
// VARBINARY(32) 32 utf8_bin
// BINARY(32) 32 binary rightpad
// CHAR(32) 32 utf8 rightpad
// ============= ======= ======== =======
//
// ``value``
// sequence of bytes with added one extra '\0' byte at the end. To obtain the
// original string, the extra '\0' should be removed.
// .. note:: the length of the string can be acquired with protobuf's field length() method
// length of sequence-of-bytes = length-of-field - 1
// .. note:: the extra byte allows to distinguish between a NULL and empty byte sequence
//
// TIME
// A time value.
//
// ``value``
// the following bytes sequence:
//
// ``| negate [ | hour | [ | minutes | [ | seconds | [ | useconds | ]]]]``
//
// * negate - one byte, should be one of: 0x00 for "+", 0x01 for "-"
// * hour - optional variable length encoded unsigned64 value for the hour
// * minutes - optional variable length encoded unsigned64 value for the minutes
// * seconds - optional variable length encoded unsigned64 value for the seconds
// * useconds - optional variable length encoded unsigned64 value for the microseconds
//
// .. seealso:: protobuf encoding in https://developers.google.com/protocol-buffers/docs/encoding
// .. note:: hour, minutes, seconds, useconds are optional if all the values to the right are 0
//
// Example: 0x00 -> +00:00:00.000000
//
// DATETIME
// A date or date and time value.
//
// ``value``
// a sequence of variants, arranged as follows:
//
// ``| year | month | day | [ | hour | [ | minutes | [ | seconds | [ | useconds | ]]]]``
//
// * year - variable length encoded unsigned64 value for the year
// * month - variable length encoded unsigned64 value for the month
// * day - variable length encoded unsigned64 value for the day
// * hour - optional variable length encoded unsigned64 value for the hour
// * minutes - optional variable length encoded unsigned64 value for the minutes
// * seconds - optional variable length encoded unsigned64 value for the seconds
// * useconds - optional variable length encoded unsigned64 value for the microseconds
//
// .. note:: hour, minutes, seconds, useconds are optional if all the values to the right are 0
//
// ``.flags & 1`` (timestamp)
//
// ============= =======
// SQL Type .flags
// ============= =======
// DATETIME
// TIMESTAMP 1
//
// DECIMAL
// An arbitrary length number. The number is encoded as a single byte
// indicating the position of the decimal point followed by the Packed BCD
// encoded number. Packed BCD is used to simplify conversion to and
// from strings and other native arbitrary precision math datatypes.
// .. seealso:: packed BCD in https://en.wikipedia.org/wiki/Binary-coded_decimal
//
// ``.length``
// maximum number of displayable decimal digits (*excluding* the decimal point and sign, but including ``.fractional_digits``)
//
// .. note:: should be in the range of 1 - 65
//
// ``.fractional_digits``
// is the decimal digits to display out of length
//
// .. note:: should be in the range of 0 - 30
//
// ``value``
// the following bytes sequence:
//
// ``| scale | BCD | sign | [0x0] |``
//
// * scale - 8bit scale value (number of decimal digit after the '.')
// * BCD - BCD encoded digits (4 bits for each digit)
// * sign - sign encoded on 4 bits (0xc = "+", 0xd = "-")
// * 0x0 - last 4bits if length(digits) % 2 == 0
//
// Example: x04 0x12 0x34 0x01 0xd0 -> -12.3401
//
// SET
// A list of strings representing a SET of values.
//
// ``value``
// A sequence of 0 or more of protobuf's bytes (length prepended octets) or one of
// the special sequences with a predefined meaning listed below.
//
// Example (length of the bytes array shown in brackets):
// * ``[0]`` - the NULL value
// * ``[1] 0x00`` - a set containing a blank string ''
// * ``[1] 0x01`` - this would be an invalid value, but is to be treated as the empty set
// * ``[2] 0x01 0x00`` - a set with a single item, which is the '\0' character
// * ``[8] 0x03 F O O 0x03 B A R`` - a set with 2 items: FOO,BAR
//
//
// :param name: name of the column
// :param original_name: name of the column before an alias was applied
// :param table: name of the table the column orginates from
// :param original_table: name of the table the column orginates from before an alias was applied
// :param schema: schema the column originates from
// :param catalog:
// catalog the schema originates from
//
// .. note::
// as there is current no support for catalogs in MySQL, don't expect this field to be set.
// In the MySQL C/S protocol the field had the value ``def`` all the time.
//
// :param fractional_digits: displayed factional decimal digits for floating point and fixed point numbers
// :param length: maximum count of displayable characters of .type
// :param flags:
// ``.type`` specific flags
//
// ======= ====== ===========
// type value description
// ======= ====== ===========
// UINT 0x0001 zerofill
// DOUBLE 0x0001 unsigned
// FLOAT 0x0001 unsigned
// DECIMAL 0x0001 unsigned
// BYTES 0x0001 rightpad
// ======= ====== ===========
//
// ====== ================
// value description
// ====== ================
// 0x0010 NOT_NULL
// 0x0020 PRIMARY_KEY
// 0x0040 UNIQUE_KEY
// 0x0080 MULTIPLE_KEY
// 0x0100 AUTO_INCREMENT
// ====== ================
//
// default: 0
// :param content_type:
// a hint about the higher-level encoding of a BYTES field
//
// ====== ====== ===========
// type value description
// ====== ====== ===========
// BYTES 0x0001 GEOMETRY (WKB encoding)
// BYTES 0x0002 JSON (text encoding)
// BYTES 0x0003 XML (text encoding)
// ====== ====== ===========
//
// .. note::
// this list isn't comprehensive. As guideline: the field's value is expected
// to pass a validator check on client and server if this field is set.
// If the server adds more internal datatypes that rely on BLOB storage
// like image manipulation, seeking into complex types in BLOBs, ... more
// types will be added.
//
type ColumnMetaData struct {
// datatype of the field in a row
Type *ColumnMetaData_FieldType `protobuf:"varint,1,req,name=type,enum=Mysqlx.Resultset.ColumnMetaData_FieldType" json:"type,omitempty"`
Name []byte `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
OriginalName []byte `protobuf:"bytes,3,opt,name=original_name,json=originalName" json:"original_name,omitempty"`
Table []byte `protobuf:"bytes,4,opt,name=table" json:"table,omitempty"`
OriginalTable []byte `protobuf:"bytes,5,opt,name=original_table,json=originalTable" json:"original_table,omitempty"`
Schema []byte `protobuf:"bytes,6,opt,name=schema" json:"schema,omitempty"`
Catalog []byte `protobuf:"bytes,7,opt,name=catalog" json:"catalog,omitempty"`
Collation *uint64 `protobuf:"varint,8,opt,name=collation" json:"collation,omitempty"`
FractionalDigits *uint32 `protobuf:"varint,9,opt,name=fractional_digits,json=fractionalDigits" json:"fractional_digits,omitempty"`
Length *uint32 `protobuf:"varint,10,opt,name=length" json:"length,omitempty"`
Flags *uint32 `protobuf:"varint,11,opt,name=flags" json:"flags,omitempty"`
ContentType *uint32 `protobuf:"varint,12,opt,name=content_type,json=contentType" json:"content_type,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ColumnMetaData) Reset() { *m = ColumnMetaData{} }
func (m *ColumnMetaData) String() string { return proto.CompactTextString(m) }
func (*ColumnMetaData) ProtoMessage() {}
func (*ColumnMetaData) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{3} }
func (m *ColumnMetaData) GetType() ColumnMetaData_FieldType {
if m != nil && m.Type != nil {
return *m.Type
}
return ColumnMetaData_SINT
}
func (m *ColumnMetaData) GetName() []byte {
if m != nil {
return m.Name
}
return nil
}
func (m *ColumnMetaData) GetOriginalName() []byte {
if m != nil {
return m.OriginalName
}
return nil
}
func (m *ColumnMetaData) GetTable() []byte {
if m != nil {
return m.Table
}
return nil
}
func (m *ColumnMetaData) GetOriginalTable() []byte {
if m != nil {
return m.OriginalTable
}
return nil
}
func (m *ColumnMetaData) GetSchema() []byte {
if m != nil {
return m.Schema
}
return nil
}
func (m *ColumnMetaData) GetCatalog() []byte {
if m != nil {
return m.Catalog
}
return nil
}
func (m *ColumnMetaData) GetCollation() uint64 {
if m != nil && m.Collation != nil {
return *m.Collation
}
return 0
}
func (m *ColumnMetaData) GetFractionalDigits() uint32 {
if m != nil && m.FractionalDigits != nil {
return *m.FractionalDigits
}
return 0
}
func (m *ColumnMetaData) GetLength() uint32 {
if m != nil && m.Length != nil {
return *m.Length
}
return 0
}
func (m *ColumnMetaData) GetFlags() uint32 {
if m != nil && m.Flags != nil {
return *m.Flags
}
return 0
}
func (m *ColumnMetaData) GetContentType() uint32 {
if m != nil && m.ContentType != nil {
return *m.ContentType
}
return 0
}
// Row in a Resultset
//
// a row is represented as a list of fields encoded as byte blobs.
// Blob of size 0 represents the NULL value. Otherwise, if it contains at least
// one byte, it encodes a non-null value of the field using encoding appropriate for the
// type of the value given by ``ColumnMetadata``, as specified
// in the :protobuf:msg:`Mysqlx.Resultset::ColumnMetaData` description.
//
type Row struct {
Field [][]byte `protobuf:"bytes,1,rep,name=field" json:"field,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Row) Reset() { *m = Row{} }
func (m *Row) String() string { return proto.CompactTextString(m) }
func (*Row) ProtoMessage() {}
func (*Row) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{4} }
func (m *Row) GetField() [][]byte {
if m != nil {
return m.Field
}
return nil
}
func init() {
proto.RegisterType((*FetchDoneMoreOutParams)(nil), "Mysqlx.Resultset.FetchDoneMoreOutParams")
proto.RegisterType((*FetchDoneMoreResultsets)(nil), "Mysqlx.Resultset.FetchDoneMoreResultsets")
proto.RegisterType((*FetchDone)(nil), "Mysqlx.Resultset.FetchDone")
proto.RegisterType((*ColumnMetaData)(nil), "Mysqlx.Resultset.ColumnMetaData")
proto.RegisterType((*Row)(nil), "Mysqlx.Resultset.Row")
proto.RegisterEnum("Mysqlx.Resultset.ColumnMetaData_FieldType", ColumnMetaData_FieldType_name, ColumnMetaData_FieldType_value)
}
func (m *FetchDoneMoreOutParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FetchDoneMoreOutParams) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *FetchDoneMoreResultsets) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FetchDoneMoreResultsets) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *FetchDone) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FetchDone) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ColumnMetaData) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ColumnMetaData) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Type == nil {
return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError)
} else {
dAtA[i] = 0x8
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Type))
}
if m.Name != nil {
dAtA[i] = 0x12
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if m.OriginalName != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.OriginalName)))
i += copy(dAtA[i:], m.OriginalName)
}
if m.Table != nil {
dAtA[i] = 0x22
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Table)))
i += copy(dAtA[i:], m.Table)
}
if m.OriginalTable != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.OriginalTable)))
i += copy(dAtA[i:], m.OriginalTable)
}
if m.Schema != nil {
dAtA[i] = 0x32
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Schema)))
i += copy(dAtA[i:], m.Schema)
}
if m.Catalog != nil {
dAtA[i] = 0x3a
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Catalog)))
i += copy(dAtA[i:], m.Catalog)
}
if m.Collation != nil {
dAtA[i] = 0x40
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Collation))
}
if m.FractionalDigits != nil {
dAtA[i] = 0x48
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.FractionalDigits))
}
if m.Length != nil {
dAtA[i] = 0x50
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Length))
}
if m.Flags != nil {
dAtA[i] = 0x58
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Flags))
}
if m.ContentType != nil {
dAtA[i] = 0x60
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.ContentType))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Row) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Row) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Field) > 0 {
for _, b := range m.Field {
dAtA[i] = 0xa
i++
i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(b)))
i += copy(dAtA[i:], b)
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64MysqlxResultset(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32MysqlxResultset(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintMysqlxResultset(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *FetchDoneMoreOutParams) Size() (n int) {
var l int
_ = l
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *FetchDoneMoreResultsets) Size() (n int) {
var l int
_ = l
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *FetchDone) Size() (n int) {
var l int
_ = l
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ColumnMetaData) Size() (n int) {
var l int
_ = l
if m.Type != nil {
n += 1 + sovMysqlxResultset(uint64(*m.Type))
}
if m.Name != nil {
l = len(m.Name)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.OriginalName != nil {
l = len(m.OriginalName)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.Table != nil {
l = len(m.Table)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.OriginalTable != nil {
l = len(m.OriginalTable)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.Schema != nil {
l = len(m.Schema)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.Catalog != nil {
l = len(m.Catalog)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
if m.Collation != nil {
n += 1 + sovMysqlxResultset(uint64(*m.Collation))
}
if m.FractionalDigits != nil {
n += 1 + sovMysqlxResultset(uint64(*m.FractionalDigits))
}
if m.Length != nil {
n += 1 + sovMysqlxResultset(uint64(*m.Length))
}
if m.Flags != nil {
n += 1 + sovMysqlxResultset(uint64(*m.Flags))
}
if m.ContentType != nil {
n += 1 + sovMysqlxResultset(uint64(*m.ContentType))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Row) Size() (n int) {
var l int
_ = l
if len(m.Field) > 0 {
for _, b := range m.Field {
l = len(b)
n += 1 + l + sovMysqlxResultset(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovMysqlxResultset(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozMysqlxResultset(x uint64) (n int) {
return sovMysqlxResultset(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *FetchDoneMoreOutParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMysqlxResultset
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: FetchDoneMoreOutParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: FetchDoneMoreOutParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipMysqlxResultset(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMysqlxResultset
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *FetchDoneMoreResultsets) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMysqlxResultset
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: FetchDoneMoreResultsets: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: FetchDoneMoreResultsets: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipMysqlxResultset(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMysqlxResultset