/
mysqlx_crud.pb.go
4902 lines (4715 loc) · 119 KB
/
mysqlx_crud.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/Crud/mysqlx_crud.proto
/*
Package Mysqlx_Crud is a generated protocol buffer package.
Basic CRUD operations
It is generated from these files:
github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.proto
It has these top-level messages:
Column
Projection
Collection
Limit
Order
UpdateOperation
Find
Insert
Update
Delete
CreateView
ModifyView
DropView
*/
package Mysqlx_Crud
import (
"fmt"
proto "github.com/golang/protobuf/proto"
math "math"
Mysqlx_Expr "github.com/pingcap/tipb/go-mysqlx/Expr"
Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes"
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
// DataModel to use for filters, names, ...
type DataModel int32
const (
DataModel_DOCUMENT DataModel = 1
DataModel_TABLE DataModel = 2
)
var DataModel_name = map[int32]string{
1: "DOCUMENT",
2: "TABLE",
}
var DataModel_value = map[string]int32{
"DOCUMENT": 1,
"TABLE": 2,
}
func (x DataModel) Enum() *DataModel {
p := new(DataModel)
*p = x
return p
}
func (x DataModel) String() string {
return proto.EnumName(DataModel_name, int32(x))
}
func (x *DataModel) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(DataModel_value, data, "DataModel")
if err != nil {
return err
}
*x = DataModel(value)
return nil
}
func (DataModel) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{0} }
// ViewAlgorithm defines how MySQL Server processes the view
type ViewAlgorithm int32
const (
ViewAlgorithm_UNDEFINED ViewAlgorithm = 1
ViewAlgorithm_MERGE ViewAlgorithm = 2
ViewAlgorithm_TEMPTABLE ViewAlgorithm = 3
)
var ViewAlgorithm_name = map[int32]string{
1: "UNDEFINED",
2: "MERGE",
3: "TEMPTABLE",
}
var ViewAlgorithm_value = map[string]int32{
"UNDEFINED": 1,
"MERGE": 2,
"TEMPTABLE": 3,
}
func (x ViewAlgorithm) Enum() *ViewAlgorithm {
p := new(ViewAlgorithm)
*p = x
return p
}
func (x ViewAlgorithm) String() string {
return proto.EnumName(ViewAlgorithm_name, int32(x))
}
func (x *ViewAlgorithm) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ViewAlgorithm_value, data, "ViewAlgorithm")
if err != nil {
return err
}
*x = ViewAlgorithm(value)
return nil
}
func (ViewAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{1} }
// ViewSqlSecurity defines the security context in which the view is going to be
// executed, this means that VIEW can be executed with current user permissions or
// with permissions of the uses who defined the VIEW
type ViewSqlSecurity int32
const (
ViewSqlSecurity_INVOKER ViewSqlSecurity = 1
ViewSqlSecurity_DEFINER ViewSqlSecurity = 2
)
var ViewSqlSecurity_name = map[int32]string{
1: "INVOKER",
2: "DEFINER",
}
var ViewSqlSecurity_value = map[string]int32{
"INVOKER": 1,
"DEFINER": 2,
}
func (x ViewSqlSecurity) Enum() *ViewSqlSecurity {
p := new(ViewSqlSecurity)
*p = x
return p
}
func (x ViewSqlSecurity) String() string {
return proto.EnumName(ViewSqlSecurity_name, int32(x))
}
func (x *ViewSqlSecurity) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ViewSqlSecurity_value, data, "ViewSqlSecurity")
if err != nil {
return err
}
*x = ViewSqlSecurity(value)
return nil
}
func (ViewSqlSecurity) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{2} }
// ViewCheckOption limits the write operations done on a `VIEW`
// (`INSERT`, `UPDATE`, `DELETE`) to rows in which the `WHERE` clause is `TRUE`
type ViewCheckOption int32
const (
ViewCheckOption_LOCAL ViewCheckOption = 1
ViewCheckOption_CASCADED ViewCheckOption = 2
)
var ViewCheckOption_name = map[int32]string{
1: "LOCAL",
2: "CASCADED",
}
var ViewCheckOption_value = map[string]int32{
"LOCAL": 1,
"CASCADED": 2,
}
func (x ViewCheckOption) Enum() *ViewCheckOption {
p := new(ViewCheckOption)
*p = x
return p
}
func (x ViewCheckOption) String() string {
return proto.EnumName(ViewCheckOption_name, int32(x))
}
func (x *ViewCheckOption) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ViewCheckOption_value, data, "ViewCheckOption")
if err != nil {
return err
}
*x = ViewCheckOption(value)
return nil
}
func (ViewCheckOption) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{3} }
type Order_Direction int32
const (
Order_ASC Order_Direction = 1
Order_DESC Order_Direction = 2
)
var Order_Direction_name = map[int32]string{
1: "ASC",
2: "DESC",
}
var Order_Direction_value = map[string]int32{
"ASC": 1,
"DESC": 2,
}
func (x Order_Direction) Enum() *Order_Direction {
p := new(Order_Direction)
*p = x
return p
}
func (x Order_Direction) String() string {
return proto.EnumName(Order_Direction_name, int32(x))
}
func (x *Order_Direction) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Order_Direction_value, data, "Order_Direction")
if err != nil {
return err
}
*x = Order_Direction(value)
return nil
}
func (Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{4, 0} }
type UpdateOperation_UpdateType int32
const (
UpdateOperation_SET UpdateOperation_UpdateType = 1
UpdateOperation_ITEM_REMOVE UpdateOperation_UpdateType = 2
UpdateOperation_ITEM_SET UpdateOperation_UpdateType = 3
UpdateOperation_ITEM_REPLACE UpdateOperation_UpdateType = 4
UpdateOperation_ITEM_MERGE UpdateOperation_UpdateType = 5
UpdateOperation_ARRAY_INSERT UpdateOperation_UpdateType = 6
UpdateOperation_ARRAY_APPEND UpdateOperation_UpdateType = 7
)
var UpdateOperation_UpdateType_name = map[int32]string{
1: "SET",
2: "ITEM_REMOVE",
3: "ITEM_SET",
4: "ITEM_REPLACE",
5: "ITEM_MERGE",
6: "ARRAY_INSERT",
7: "ARRAY_APPEND",
}
var UpdateOperation_UpdateType_value = map[string]int32{
"SET": 1,
"ITEM_REMOVE": 2,
"ITEM_SET": 3,
"ITEM_REPLACE": 4,
"ITEM_MERGE": 5,
"ARRAY_INSERT": 6,
"ARRAY_APPEND": 7,
}
func (x UpdateOperation_UpdateType) Enum() *UpdateOperation_UpdateType {
p := new(UpdateOperation_UpdateType)
*p = x
return p
}
func (x UpdateOperation_UpdateType) String() string {
return proto.EnumName(UpdateOperation_UpdateType_name, int32(x))
}
func (x *UpdateOperation_UpdateType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(UpdateOperation_UpdateType_value, data, "UpdateOperation_UpdateType")
if err != nil {
return err
}
*x = UpdateOperation_UpdateType(value)
return nil
}
func (UpdateOperation_UpdateType) EnumDescriptor() ([]byte, []int) {
return fileDescriptorMysqlxCrud, []int{5, 0}
}
// column definition
type Column struct {
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Alias *string `protobuf:"bytes,2,opt,name=alias" json:"alias,omitempty"`
DocumentPath []*Mysqlx_Expr.DocumentPathItem `protobuf:"bytes,3,rep,name=document_path,json=documentPath" json:"document_path,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Column) Reset() { *m = Column{} }
func (m *Column) String() string { return proto.CompactTextString(m) }
func (*Column) ProtoMessage() {}
func (*Column) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{0} }
func (m *Column) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *Column) GetAlias() string {
if m != nil && m.Alias != nil {
return *m.Alias
}
return ""
}
func (m *Column) GetDocumentPath() []*Mysqlx_Expr.DocumentPathItem {
if m != nil {
return m.DocumentPath
}
return nil
}
// a projection
//
// :param source: the expression identifying an element from the source data
// which can include a column identifier or any expression
// :param alias: optional alias. Required for DOCUMENTs (clients may use
// the source string as default)
type Projection struct {
Source *Mysqlx_Expr.Expr `protobuf:"bytes,1,req,name=source" json:"source,omitempty"`
Alias *string `protobuf:"bytes,2,opt,name=alias" json:"alias,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Projection) Reset() { *m = Projection{} }
func (m *Projection) String() string { return proto.CompactTextString(m) }
func (*Projection) ProtoMessage() {}
func (*Projection) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{1} }
func (m *Projection) GetSource() *Mysqlx_Expr.Expr {
if m != nil {
return m.Source
}
return nil
}
func (m *Projection) GetAlias() string {
if m != nil && m.Alias != nil {
return *m.Alias
}
return ""
}
// collection
type Collection struct {
Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
Schema *string `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Collection) Reset() { *m = Collection{} }
func (m *Collection) String() string { return proto.CompactTextString(m) }
func (*Collection) ProtoMessage() {}
func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{2} }
func (m *Collection) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *Collection) GetSchema() string {
if m != nil && m.Schema != nil {
return *m.Schema
}
return ""
}
// limit
//
// :param row_count: maximum rows to filter
// :param offset: maximum rows to skip before applying the row_count
type Limit struct {
RowCount *uint64 `protobuf:"varint,1,req,name=row_count,json=rowCount" json:"row_count,omitempty"`
Offset *uint64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Limit) Reset() { *m = Limit{} }
func (m *Limit) String() string { return proto.CompactTextString(m) }
func (*Limit) ProtoMessage() {}
func (*Limit) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{3} }
func (m *Limit) GetRowCount() uint64 {
if m != nil && m.RowCount != nil {
return *m.RowCount
}
return 0
}
func (m *Limit) GetOffset() uint64 {
if m != nil && m.Offset != nil {
return *m.Offset
}
return 0
}
// sort order
type Order struct {
Expr *Mysqlx_Expr.Expr `protobuf:"bytes,1,req,name=expr" json:"expr,omitempty"`
Direction *Order_Direction `protobuf:"varint,2,opt,name=direction,enum=Mysqlx.Crud.Order_Direction,def=1" json:"direction,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Order) Reset() { *m = Order{} }
func (m *Order) String() string { return proto.CompactTextString(m) }
func (*Order) ProtoMessage() {}
func (*Order) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{4} }
const Default_Order_Direction Order_Direction = Order_ASC
func (m *Order) GetExpr() *Mysqlx_Expr.Expr {
if m != nil {
return m.Expr
}
return nil
}
func (m *Order) GetDirection() Order_Direction {
if m != nil && m.Direction != nil {
return *m.Direction
}
return Default_Order_Direction
}
// update operations
//
// :param source: specification of the value to be updated
// if data_model is TABLE, a column name may be specified and also a document path, if the column has type JSON
// if data_model is DOCUMENT, only document paths are allowed
// in both cases, schema and table must be not set
// :param operation: the type of operation to be performed
// :param value: an expression to be computed as the new value for the operation
type UpdateOperation struct {
Source *Mysqlx_Expr.ColumnIdentifier `protobuf:"bytes,1,req,name=source" json:"source,omitempty"`
Operation *UpdateOperation_UpdateType `protobuf:"varint,2,req,name=operation,enum=Mysqlx.Crud.UpdateOperation_UpdateType" json:"operation,omitempty"`
Value *Mysqlx_Expr.Expr `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *UpdateOperation) Reset() { *m = UpdateOperation{} }
func (m *UpdateOperation) String() string { return proto.CompactTextString(m) }
func (*UpdateOperation) ProtoMessage() {}
func (*UpdateOperation) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{5} }
func (m *UpdateOperation) GetSource() *Mysqlx_Expr.ColumnIdentifier {
if m != nil {
return m.Source
}
return nil
}
func (m *UpdateOperation) GetOperation() UpdateOperation_UpdateType {
if m != nil && m.Operation != nil {
return *m.Operation
}
return UpdateOperation_SET
}
func (m *UpdateOperation) GetValue() *Mysqlx_Expr.Expr {
if m != nil {
return m.Value
}
return nil
}
// Find Documents/Rows in a Collection/Table
//
// .. uml::
//
// client -> server: Find
// ... one or more Resultset ...
//
// :param collection: collection to insert into
// :param data_model: datamodel that the operations refer to
// :param projection: list of column projections that shall be returned
// :param args: values for parameters used in filter expression
// :param criteria: filter criteria
// :param limit: numbers of rows that shall be skipped and returned
// :param order: sort-order in which the rows/document shall be returned in
// :param grouping: column expression list for aggregation (GROUP BY)
// :param grouping_criteria: filter criteria for aggregated groups
// :Returns: :protobuf:msg:`Mysqlx.Resultset::`
type Find struct {
Collection *Collection `protobuf:"bytes,2,req,name=collection" json:"collection,omitempty"`
DataModel *DataModel `protobuf:"varint,3,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"`
Projection []*Projection `protobuf:"bytes,4,rep,name=projection" json:"projection,omitempty"`
Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,5,opt,name=criteria" json:"criteria,omitempty"`
Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,11,rep,name=args" json:"args,omitempty"`
Limit *Limit `protobuf:"bytes,6,opt,name=limit" json:"limit,omitempty"`
Order []*Order `protobuf:"bytes,7,rep,name=order" json:"order,omitempty"`
Grouping []*Mysqlx_Expr.Expr `protobuf:"bytes,8,rep,name=grouping" json:"grouping,omitempty"`
GroupingCriteria *Mysqlx_Expr.Expr `protobuf:"bytes,9,opt,name=grouping_criteria,json=groupingCriteria" json:"grouping_criteria,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Find) Reset() { *m = Find{} }
func (m *Find) String() string { return proto.CompactTextString(m) }
func (*Find) ProtoMessage() {}
func (*Find) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{6} }
func (m *Find) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *Find) GetDataModel() DataModel {
if m != nil && m.DataModel != nil {
return *m.DataModel
}
return DataModel_DOCUMENT
}
func (m *Find) GetProjection() []*Projection {
if m != nil {
return m.Projection
}
return nil
}
func (m *Find) GetCriteria() *Mysqlx_Expr.Expr {
if m != nil {
return m.Criteria
}
return nil
}
func (m *Find) GetArgs() []*Mysqlx_Datatypes.Scalar {
if m != nil {
return m.Args
}
return nil
}
func (m *Find) GetLimit() *Limit {
if m != nil {
return m.Limit
}
return nil
}
func (m *Find) GetOrder() []*Order {
if m != nil {
return m.Order
}
return nil
}
func (m *Find) GetGrouping() []*Mysqlx_Expr.Expr {
if m != nil {
return m.Grouping
}
return nil
}
func (m *Find) GetGroupingCriteria() *Mysqlx_Expr.Expr {
if m != nil {
return m.GroupingCriteria
}
return nil
}
// Insert documents/rows into a collection/table
//
// :param collection: collection to insert into
// :param data_model: datamodel that the operations refer to
// :param projection: name of the columns to insert data into (empty if data_model is DOCUMENT)
// :param row: set of rows to insert into the collection/table (a single expression with a JSON document literal or an OBJECT expression)
// :param args: values for parameters used in row expressions
// :Returns: :protobuf:msg:`Mysqlx.Resultset::`
type Insert struct {
Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"`
DataModel *DataModel `protobuf:"varint,2,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"`
Projection []*Column `protobuf:"bytes,3,rep,name=projection" json:"projection,omitempty"`
Row []*Insert_TypedRow `protobuf:"bytes,4,rep,name=row" json:"row,omitempty"`
Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,5,rep,name=args" json:"args,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Insert) Reset() { *m = Insert{} }
func (m *Insert) String() string { return proto.CompactTextString(m) }
func (*Insert) ProtoMessage() {}
func (*Insert) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{7} }
func (m *Insert) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *Insert) GetDataModel() DataModel {
if m != nil && m.DataModel != nil {
return *m.DataModel
}
return DataModel_DOCUMENT
}
func (m *Insert) GetProjection() []*Column {
if m != nil {
return m.Projection
}
return nil
}
func (m *Insert) GetRow() []*Insert_TypedRow {
if m != nil {
return m.Row
}
return nil
}
func (m *Insert) GetArgs() []*Mysqlx_Datatypes.Scalar {
if m != nil {
return m.Args
}
return nil
}
type Insert_TypedRow struct {
Field []*Mysqlx_Expr.Expr `protobuf:"bytes,1,rep,name=field" json:"field,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Insert_TypedRow) Reset() { *m = Insert_TypedRow{} }
func (m *Insert_TypedRow) String() string { return proto.CompactTextString(m) }
func (*Insert_TypedRow) ProtoMessage() {}
func (*Insert_TypedRow) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{7, 0} }
func (m *Insert_TypedRow) GetField() []*Mysqlx_Expr.Expr {
if m != nil {
return m.Field
}
return nil
}
// Update documents/rows in a collection/table
//
// :param collection: collection to change
// :param data_model: datamodel that the operations refer to
// :param criteria: filter expression to match rows that the operations will apply on
// :param args: values for parameters used in filter expression
// :param limit: limits the number of rows to match
// :param order: specifies order of matched rows
// :param operation: list of operations to be applied. Valid operations will depend on the data_model.
// :Returns: :protobuf:msg:`Mysqlx.Resultset::`
type Update struct {
Collection *Collection `protobuf:"bytes,2,req,name=collection" json:"collection,omitempty"`
DataModel *DataModel `protobuf:"varint,3,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"`
Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,4,opt,name=criteria" json:"criteria,omitempty"`
Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,8,rep,name=args" json:"args,omitempty"`
Limit *Limit `protobuf:"bytes,5,opt,name=limit" json:"limit,omitempty"`
Order []*Order `protobuf:"bytes,6,rep,name=order" json:"order,omitempty"`
Operation []*UpdateOperation `protobuf:"bytes,7,rep,name=operation" json:"operation,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Update) Reset() { *m = Update{} }
func (m *Update) String() string { return proto.CompactTextString(m) }
func (*Update) ProtoMessage() {}
func (*Update) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{8} }
func (m *Update) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *Update) GetDataModel() DataModel {
if m != nil && m.DataModel != nil {
return *m.DataModel
}
return DataModel_DOCUMENT
}
func (m *Update) GetCriteria() *Mysqlx_Expr.Expr {
if m != nil {
return m.Criteria
}
return nil
}
func (m *Update) GetArgs() []*Mysqlx_Datatypes.Scalar {
if m != nil {
return m.Args
}
return nil
}
func (m *Update) GetLimit() *Limit {
if m != nil {
return m.Limit
}
return nil
}
func (m *Update) GetOrder() []*Order {
if m != nil {
return m.Order
}
return nil
}
func (m *Update) GetOperation() []*UpdateOperation {
if m != nil {
return m.Operation
}
return nil
}
// Delete documents/rows from a Collection/Table
//
// :param collection: collection to change
// :param data_model: datamodel that the operations refer to
// :param criteria: filter expression to match rows that the operations will apply on
// :param args: values for parameters used in filter expression
// :param limit: limits the number of rows to match
// :param order: specifies order of matched rows
// :Returns: :protobuf:msg:`Mysqlx.Resultset::`
type Delete struct {
Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"`
DataModel *DataModel `protobuf:"varint,2,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"`
Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,3,opt,name=criteria" json:"criteria,omitempty"`
Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,6,rep,name=args" json:"args,omitempty"`
Limit *Limit `protobuf:"bytes,4,opt,name=limit" json:"limit,omitempty"`
Order []*Order `protobuf:"bytes,5,rep,name=order" json:"order,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Delete) Reset() { *m = Delete{} }
func (m *Delete) String() string { return proto.CompactTextString(m) }
func (*Delete) ProtoMessage() {}
func (*Delete) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{9} }
func (m *Delete) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *Delete) GetDataModel() DataModel {
if m != nil && m.DataModel != nil {
return *m.DataModel
}
return DataModel_DOCUMENT
}
func (m *Delete) GetCriteria() *Mysqlx_Expr.Expr {
if m != nil {
return m.Criteria
}
return nil
}
func (m *Delete) GetArgs() []*Mysqlx_Datatypes.Scalar {
if m != nil {
return m.Args
}
return nil
}
func (m *Delete) GetLimit() *Limit {
if m != nil {
return m.Limit
}
return nil
}
func (m *Delete) GetOrder() []*Order {
if m != nil {
return m.Order
}
return nil
}
type CreateView struct {
Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"`
Definer *string `protobuf:"bytes,2,opt,name=definer" json:"definer,omitempty"`
Algorithm *ViewAlgorithm `protobuf:"varint,3,opt,name=algorithm,enum=Mysqlx.Crud.ViewAlgorithm,def=1" json:"algorithm,omitempty"`
Security *ViewSqlSecurity `protobuf:"varint,4,opt,name=security,enum=Mysqlx.Crud.ViewSqlSecurity,def=2" json:"security,omitempty"`
Check *ViewCheckOption `protobuf:"varint,5,opt,name=check,enum=Mysqlx.Crud.ViewCheckOption" json:"check,omitempty"`
Column []string `protobuf:"bytes,6,rep,name=column" json:"column,omitempty"`
Stmt *Find `protobuf:"bytes,7,req,name=stmt" json:"stmt,omitempty"`
ReplaceExisting *bool `protobuf:"varint,8,opt,name=replace_existing,json=replaceExisting,def=0" json:"replace_existing,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *CreateView) Reset() { *m = CreateView{} }
func (m *CreateView) String() string { return proto.CompactTextString(m) }
func (*CreateView) ProtoMessage() {}
func (*CreateView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{10} }
const Default_CreateView_Algorithm ViewAlgorithm = ViewAlgorithm_UNDEFINED
const Default_CreateView_Security ViewSqlSecurity = ViewSqlSecurity_DEFINER
const Default_CreateView_ReplaceExisting bool = false
func (m *CreateView) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *CreateView) GetDefiner() string {
if m != nil && m.Definer != nil {
return *m.Definer
}
return ""
}
func (m *CreateView) GetAlgorithm() ViewAlgorithm {
if m != nil && m.Algorithm != nil {
return *m.Algorithm
}
return Default_CreateView_Algorithm
}
func (m *CreateView) GetSecurity() ViewSqlSecurity {
if m != nil && m.Security != nil {
return *m.Security
}
return Default_CreateView_Security
}
func (m *CreateView) GetCheck() ViewCheckOption {
if m != nil && m.Check != nil {
return *m.Check
}
return ViewCheckOption_LOCAL
}
func (m *CreateView) GetColumn() []string {
if m != nil {
return m.Column
}
return nil
}
func (m *CreateView) GetStmt() *Find {
if m != nil {
return m.Stmt
}
return nil
}
func (m *CreateView) GetReplaceExisting() bool {
if m != nil && m.ReplaceExisting != nil {
return *m.ReplaceExisting
}
return Default_CreateView_ReplaceExisting
}
type ModifyView struct {
Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"`
Definer *string `protobuf:"bytes,2,opt,name=definer" json:"definer,omitempty"`
Algorithm *ViewAlgorithm `protobuf:"varint,3,opt,name=algorithm,enum=Mysqlx.Crud.ViewAlgorithm" json:"algorithm,omitempty"`
Security *ViewSqlSecurity `protobuf:"varint,4,opt,name=security,enum=Mysqlx.Crud.ViewSqlSecurity" json:"security,omitempty"`
Check *ViewCheckOption `protobuf:"varint,5,opt,name=check,enum=Mysqlx.Crud.ViewCheckOption" json:"check,omitempty"`
Column []string `protobuf:"bytes,6,rep,name=column" json:"column,omitempty"`
Stmt *Find `protobuf:"bytes,7,opt,name=stmt" json:"stmt,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ModifyView) Reset() { *m = ModifyView{} }
func (m *ModifyView) String() string { return proto.CompactTextString(m) }
func (*ModifyView) ProtoMessage() {}
func (*ModifyView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{11} }
func (m *ModifyView) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *ModifyView) GetDefiner() string {
if m != nil && m.Definer != nil {
return *m.Definer
}
return ""
}
func (m *ModifyView) GetAlgorithm() ViewAlgorithm {
if m != nil && m.Algorithm != nil {
return *m.Algorithm
}
return ViewAlgorithm_UNDEFINED
}
func (m *ModifyView) GetSecurity() ViewSqlSecurity {
if m != nil && m.Security != nil {
return *m.Security
}
return ViewSqlSecurity_INVOKER
}
func (m *ModifyView) GetCheck() ViewCheckOption {
if m != nil && m.Check != nil {
return *m.Check
}
return ViewCheckOption_LOCAL
}
func (m *ModifyView) GetColumn() []string {
if m != nil {
return m.Column
}
return nil
}
func (m *ModifyView) GetStmt() *Find {
if m != nil {
return m.Stmt
}
return nil
}
type DropView struct {
Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"`
IfExists *bool `protobuf:"varint,2,opt,name=if_exists,json=ifExists,def=0" json:"if_exists,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *DropView) Reset() { *m = DropView{} }
func (m *DropView) String() string { return proto.CompactTextString(m) }
func (*DropView) ProtoMessage() {}
func (*DropView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{12} }
const Default_DropView_IfExists bool = false
func (m *DropView) GetCollection() *Collection {
if m != nil {
return m.Collection
}
return nil
}
func (m *DropView) GetIfExists() bool {
if m != nil && m.IfExists != nil {
return *m.IfExists
}
return Default_DropView_IfExists
}
func init() {
proto.RegisterType((*Column)(nil), "Mysqlx.Crud.Column")
proto.RegisterType((*Projection)(nil), "Mysqlx.Crud.Projection")
proto.RegisterType((*Collection)(nil), "Mysqlx.Crud.Collection")
proto.RegisterType((*Limit)(nil), "Mysqlx.Crud.Limit")
proto.RegisterType((*Order)(nil), "Mysqlx.Crud.Order")
proto.RegisterType((*UpdateOperation)(nil), "Mysqlx.Crud.UpdateOperation")
proto.RegisterType((*Find)(nil), "Mysqlx.Crud.Find")
proto.RegisterType((*Insert)(nil), "Mysqlx.Crud.Insert")
proto.RegisterType((*Insert_TypedRow)(nil), "Mysqlx.Crud.Insert.TypedRow")
proto.RegisterType((*Update)(nil), "Mysqlx.Crud.Update")
proto.RegisterType((*Delete)(nil), "Mysqlx.Crud.Delete")
proto.RegisterType((*CreateView)(nil), "Mysqlx.Crud.CreateView")
proto.RegisterType((*ModifyView)(nil), "Mysqlx.Crud.ModifyView")
proto.RegisterType((*DropView)(nil), "Mysqlx.Crud.DropView")
proto.RegisterEnum("Mysqlx.Crud.DataModel", DataModel_name, DataModel_value)
proto.RegisterEnum("Mysqlx.Crud.ViewAlgorithm", ViewAlgorithm_name, ViewAlgorithm_value)
proto.RegisterEnum("Mysqlx.Crud.ViewSqlSecurity", ViewSqlSecurity_name, ViewSqlSecurity_value)
proto.RegisterEnum("Mysqlx.Crud.ViewCheckOption", ViewCheckOption_name, ViewCheckOption_value)
proto.RegisterEnum("Mysqlx.Crud.Order_Direction", Order_Direction_name, Order_Direction_value)
proto.RegisterEnum("Mysqlx.Crud.UpdateOperation_UpdateType", UpdateOperation_UpdateType_name, UpdateOperation_UpdateType_value)
}
func (m *Column) 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 *Column) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Name != nil {
dAtA[i] = 0xa
i++
i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Name)))
i += copy(dAtA[i:], *m.Name)
}