forked from rethinkdb/rethinkdb-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ql2.pb.go
2091 lines (1984 loc) · 76.9 KB
/
ql2.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: ql2.proto
package ql2
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// 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
// non-conforming protobuf libraries
// This enum contains the magic numbers for your version. See **THE HIGH-LEVEL
// VIEW** for what to do with it.
type VersionDummy_Version int32
const (
VersionDummy_V0_1 VersionDummy_Version = 1063369270
VersionDummy_V0_2 VersionDummy_Version = 1915781601
VersionDummy_V0_3 VersionDummy_Version = 1601562686
VersionDummy_V0_4 VersionDummy_Version = 1074539808
VersionDummy_V1_0 VersionDummy_Version = 885177795
)
var VersionDummy_Version_name = map[int32]string{
1063369270: "V0_1",
1915781601: "V0_2",
1601562686: "V0_3",
1074539808: "V0_4",
885177795: "V1_0",
}
var VersionDummy_Version_value = map[string]int32{
"V0_1": 1063369270,
"V0_2": 1915781601,
"V0_3": 1601562686,
"V0_4": 1074539808,
"V1_0": 885177795,
}
func (x VersionDummy_Version) Enum() *VersionDummy_Version {
p := new(VersionDummy_Version)
*p = x
return p
}
func (x VersionDummy_Version) String() string {
return proto.EnumName(VersionDummy_Version_name, int32(x))
}
func (x *VersionDummy_Version) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(VersionDummy_Version_value, data, "VersionDummy_Version")
if err != nil {
return err
}
*x = VersionDummy_Version(value)
return nil
}
func (VersionDummy_Version) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{0, 0}
}
// The protocol to use after the handshake, specified in V0_3
type VersionDummy_Protocol int32
const (
VersionDummy_PROTOBUF VersionDummy_Protocol = 656407617
VersionDummy_JSON VersionDummy_Protocol = 2120839367
)
var VersionDummy_Protocol_name = map[int32]string{
656407617: "PROTOBUF",
2120839367: "JSON",
}
var VersionDummy_Protocol_value = map[string]int32{
"PROTOBUF": 656407617,
"JSON": 2120839367,
}
func (x VersionDummy_Protocol) Enum() *VersionDummy_Protocol {
p := new(VersionDummy_Protocol)
*p = x
return p
}
func (x VersionDummy_Protocol) String() string {
return proto.EnumName(VersionDummy_Protocol_name, int32(x))
}
func (x *VersionDummy_Protocol) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(VersionDummy_Protocol_value, data, "VersionDummy_Protocol")
if err != nil {
return err
}
*x = VersionDummy_Protocol(value)
return nil
}
func (VersionDummy_Protocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{0, 1}
}
type Query_QueryType int32
const (
Query_START Query_QueryType = 1
Query_CONTINUE Query_QueryType = 2
// (see [Response]).
Query_STOP Query_QueryType = 3
Query_NOREPLY_WAIT Query_QueryType = 4
Query_SERVER_INFO Query_QueryType = 5
)
var Query_QueryType_name = map[int32]string{
1: "START",
2: "CONTINUE",
3: "STOP",
4: "NOREPLY_WAIT",
5: "SERVER_INFO",
}
var Query_QueryType_value = map[string]int32{
"START": 1,
"CONTINUE": 2,
"STOP": 3,
"NOREPLY_WAIT": 4,
"SERVER_INFO": 5,
}
func (x Query_QueryType) Enum() *Query_QueryType {
p := new(Query_QueryType)
*p = x
return p
}
func (x Query_QueryType) String() string {
return proto.EnumName(Query_QueryType_name, int32(x))
}
func (x *Query_QueryType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Query_QueryType_value, data, "Query_QueryType")
if err != nil {
return err
}
*x = Query_QueryType(value)
return nil
}
func (Query_QueryType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{1, 0}
}
type Frame_FrameType int32
const (
Frame_POS Frame_FrameType = 1
Frame_OPT Frame_FrameType = 2
)
var Frame_FrameType_name = map[int32]string{
1: "POS",
2: "OPT",
}
var Frame_FrameType_value = map[string]int32{
"POS": 1,
"OPT": 2,
}
func (x Frame_FrameType) Enum() *Frame_FrameType {
p := new(Frame_FrameType)
*p = x
return p
}
func (x Frame_FrameType) String() string {
return proto.EnumName(Frame_FrameType_name, int32(x))
}
func (x *Frame_FrameType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Frame_FrameType_value, data, "Frame_FrameType")
if err != nil {
return err
}
*x = Frame_FrameType(value)
return nil
}
func (Frame_FrameType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{2, 0}
}
type Response_ResponseType int32
const (
// These response types indicate success.
Response_SUCCESS_ATOM Response_ResponseType = 1
Response_SUCCESS_SEQUENCE Response_ResponseType = 2
Response_SUCCESS_PARTIAL Response_ResponseType = 3
// datatypes. If you send a [CONTINUE] query with
// the same token as this response, you will get
// more of the sequence. Keep sending [CONTINUE]
// queries until you get back [SUCCESS_SEQUENCE].
Response_WAIT_COMPLETE Response_ResponseType = 4
Response_SERVER_INFO Response_ResponseType = 5
// These response types indicate failure.
Response_CLIENT_ERROR Response_ResponseType = 16
// client sends a malformed protobuf, or tries to
// send [CONTINUE] for an unknown token.
Response_COMPILE_ERROR Response_ResponseType = 17
// checking. For example, if you pass too many
// arguments to a function.
Response_RUNTIME_ERROR Response_ResponseType = 18
)
var Response_ResponseType_name = map[int32]string{
1: "SUCCESS_ATOM",
2: "SUCCESS_SEQUENCE",
3: "SUCCESS_PARTIAL",
4: "WAIT_COMPLETE",
5: "SERVER_INFO",
16: "CLIENT_ERROR",
17: "COMPILE_ERROR",
18: "RUNTIME_ERROR",
}
var Response_ResponseType_value = map[string]int32{
"SUCCESS_ATOM": 1,
"SUCCESS_SEQUENCE": 2,
"SUCCESS_PARTIAL": 3,
"WAIT_COMPLETE": 4,
"SERVER_INFO": 5,
"CLIENT_ERROR": 16,
"COMPILE_ERROR": 17,
"RUNTIME_ERROR": 18,
}
func (x Response_ResponseType) Enum() *Response_ResponseType {
p := new(Response_ResponseType)
*p = x
return p
}
func (x Response_ResponseType) String() string {
return proto.EnumName(Response_ResponseType_name, int32(x))
}
func (x *Response_ResponseType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Response_ResponseType_value, data, "Response_ResponseType")
if err != nil {
return err
}
*x = Response_ResponseType(value)
return nil
}
func (Response_ResponseType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{4, 0}
}
// If `ResponseType` is `RUNTIME_ERROR`, this may be filled in with more
// information about the error.
type Response_ErrorType int32
const (
Response_INTERNAL Response_ErrorType = 1000000
Response_RESOURCE_LIMIT Response_ErrorType = 2000000
Response_QUERY_LOGIC Response_ErrorType = 3000000
Response_NON_EXISTENCE Response_ErrorType = 3100000
Response_OP_FAILED Response_ErrorType = 4100000
Response_OP_INDETERMINATE Response_ErrorType = 4200000
Response_USER Response_ErrorType = 5000000
Response_PERMISSION_ERROR Response_ErrorType = 6000000
)
var Response_ErrorType_name = map[int32]string{
1000000: "INTERNAL",
2000000: "RESOURCE_LIMIT",
3000000: "QUERY_LOGIC",
3100000: "NON_EXISTENCE",
4100000: "OP_FAILED",
4200000: "OP_INDETERMINATE",
5000000: "USER",
6000000: "PERMISSION_ERROR",
}
var Response_ErrorType_value = map[string]int32{
"INTERNAL": 1000000,
"RESOURCE_LIMIT": 2000000,
"QUERY_LOGIC": 3000000,
"NON_EXISTENCE": 3100000,
"OP_FAILED": 4100000,
"OP_INDETERMINATE": 4200000,
"USER": 5000000,
"PERMISSION_ERROR": 6000000,
}
func (x Response_ErrorType) Enum() *Response_ErrorType {
p := new(Response_ErrorType)
*p = x
return p
}
func (x Response_ErrorType) String() string {
return proto.EnumName(Response_ErrorType_name, int32(x))
}
func (x *Response_ErrorType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Response_ErrorType_value, data, "Response_ErrorType")
if err != nil {
return err
}
*x = Response_ErrorType(value)
return nil
}
func (Response_ErrorType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{4, 1}
}
// ResponseNotes are used to provide information about the query
// response that may be useful for people writing drivers or ORMs.
// Currently all the notes we send indicate that a stream has certain
// special properties.
type Response_ResponseNote int32
const (
// The stream is a changefeed stream (e.g. `r.table('test').changes()`).
Response_SEQUENCE_FEED Response_ResponseNote = 1
// The stream is a point changefeed stream
// (e.g. `r.table('test').get(0).changes()`).
Response_ATOM_FEED Response_ResponseNote = 2
// The stream is an order_by_limit changefeed stream
// (e.g. `r.table('test').order_by(index: 'id').limit(5).changes()`).
Response_ORDER_BY_LIMIT_FEED Response_ResponseNote = 3
// The stream is a union of multiple changefeed types that can't be
// collapsed to a single type
// (e.g. `r.table('test').changes().union(r.table('test').get(0).changes())`).
Response_UNIONED_FEED Response_ResponseNote = 4
// The stream is a changefeed stream and includes notes on what state
// the changefeed stream is in (e.g. objects of the form `{state:
// 'initializing'}`).
Response_INCLUDES_STATES Response_ResponseNote = 5
)
var Response_ResponseNote_name = map[int32]string{
1: "SEQUENCE_FEED",
2: "ATOM_FEED",
3: "ORDER_BY_LIMIT_FEED",
4: "UNIONED_FEED",
5: "INCLUDES_STATES",
}
var Response_ResponseNote_value = map[string]int32{
"SEQUENCE_FEED": 1,
"ATOM_FEED": 2,
"ORDER_BY_LIMIT_FEED": 3,
"UNIONED_FEED": 4,
"INCLUDES_STATES": 5,
}
func (x Response_ResponseNote) Enum() *Response_ResponseNote {
p := new(Response_ResponseNote)
*p = x
return p
}
func (x Response_ResponseNote) String() string {
return proto.EnumName(Response_ResponseNote_name, int32(x))
}
func (x *Response_ResponseNote) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Response_ResponseNote_value, data, "Response_ResponseNote")
if err != nil {
return err
}
*x = Response_ResponseNote(value)
return nil
}
func (Response_ResponseNote) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{4, 2}
}
type Datum_DatumType int32
const (
Datum_R_NULL Datum_DatumType = 1
Datum_R_BOOL Datum_DatumType = 2
Datum_R_NUM Datum_DatumType = 3
Datum_R_STR Datum_DatumType = 4
Datum_R_ARRAY Datum_DatumType = 5
Datum_R_OBJECT Datum_DatumType = 6
// This [DatumType] will only be used if [accepts_r_json] is
// set to [true] in [Query]. [r_str] will be filled with a
// JSON encoding of the [Datum].
Datum_R_JSON Datum_DatumType = 7
)
var Datum_DatumType_name = map[int32]string{
1: "R_NULL",
2: "R_BOOL",
3: "R_NUM",
4: "R_STR",
5: "R_ARRAY",
6: "R_OBJECT",
7: "R_JSON",
}
var Datum_DatumType_value = map[string]int32{
"R_NULL": 1,
"R_BOOL": 2,
"R_NUM": 3,
"R_STR": 4,
"R_ARRAY": 5,
"R_OBJECT": 6,
"R_JSON": 7,
}
func (x Datum_DatumType) Enum() *Datum_DatumType {
p := new(Datum_DatumType)
*p = x
return p
}
func (x Datum_DatumType) String() string {
return proto.EnumName(Datum_DatumType_name, int32(x))
}
func (x *Datum_DatumType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Datum_DatumType_value, data, "Datum_DatumType")
if err != nil {
return err
}
*x = Datum_DatumType(value)
return nil
}
func (Datum_DatumType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ql2_e86fe8a8468b24a0, []int{5, 0}
}
type Term_TermType int32
const (
// A RQL datum, stored in `datum` below.
Term_DATUM Term_TermType = 1
Term_MAKE_ARRAY Term_TermType = 2
// Evaluate the terms in [optargs] and make an object
Term_MAKE_OBJ Term_TermType = 3
// Takes an integer representing a variable and returns the value stored
// in that variable. It's the responsibility of the client to translate
// from their local representation of a variable to a unique _non-negative_
// integer for that variable. (We do it this way instead of letting
// clients provide variable names as strings to discourage
// variable-capturing client libraries, and because it's more efficient
// on the wire.)
Term_VAR Term_TermType = 10
// Takes some javascript code and executes it.
Term_JAVASCRIPT Term_TermType = 11
// STRING {timeout: !NUMBER} -> Function(*)
Term_UUID Term_TermType = 169
// Takes an HTTP URL and gets it. If the get succeeds and
// returns valid JSON, it is converted into a DATUM
Term_HTTP Term_TermType = 153
// Takes a string and throws an error with that message.
// Inside of a `default` block, you can omit the first
// argument to rethrow whatever error you catch (this is most
// useful as an argument to the `default` filter optarg).
Term_ERROR Term_TermType = 12
// Takes nothing and returns a reference to the implicit variable.
Term_IMPLICIT_VAR Term_TermType = 13
// * Data Operators
// Returns a reference to a database.
Term_DB Term_TermType = 14
// Returns a reference to a table.
Term_TABLE Term_TermType = 15
// STRING, {read_mode:STRING, identifier_format:STRING} -> Table
// Gets a single element from a table by its primary or a secondary key.
Term_GET Term_TermType = 16
// Table, STRING -> NULL | Table, NUMBER -> NULL |
Term_GET_ALL Term_TermType = 78
// Simple DATUM Ops
Term_EQ Term_TermType = 17
Term_NE Term_TermType = 18
Term_LT Term_TermType = 19
Term_LE Term_TermType = 20
Term_GT Term_TermType = 21
Term_GE Term_TermType = 22
Term_NOT Term_TermType = 23
// ADD can either add two numbers or concatenate two arrays.
Term_ADD Term_TermType = 24
Term_SUB Term_TermType = 25
Term_MUL Term_TermType = 26
Term_DIV Term_TermType = 27
Term_MOD Term_TermType = 28
Term_FLOOR Term_TermType = 183
Term_CEIL Term_TermType = 184
Term_ROUND Term_TermType = 185
// DATUM Array Ops
// Append a single element to the end of an array (like `snoc`).
Term_APPEND Term_TermType = 29
// Prepend a single element to the end of an array (like `cons`).
Term_PREPEND Term_TermType = 80
// Remove the elements of one array from another array.
Term_DIFFERENCE Term_TermType = 95
// DATUM Set Ops
// Set ops work on arrays. They don't use actual sets and thus have
// performance characteristics you would expect from arrays rather than
// from sets. All set operations have the post condition that they
// array they return contains no duplicate values.
Term_SET_INSERT Term_TermType = 88
Term_SET_INTERSECTION Term_TermType = 89
Term_SET_UNION Term_TermType = 90
Term_SET_DIFFERENCE Term_TermType = 91
Term_SLICE Term_TermType = 30
Term_SKIP Term_TermType = 70
Term_LIMIT Term_TermType = 71
Term_OFFSETS_OF Term_TermType = 87
Term_CONTAINS Term_TermType = 93
// Stream/Object Ops
// Get a particular field from an object, or map that over a
// sequence.
Term_GET_FIELD Term_TermType = 31
// | Sequence, STRING -> Sequence
// Return an array containing the keys of the object.
Term_KEYS Term_TermType = 94
// Return an array containing the values of the object.
Term_VALUES Term_TermType = 186
// Creates an object
Term_OBJECT Term_TermType = 143
// Check whether an object contains all the specified fields,
// or filters a sequence so that all objects inside of it
// contain all the specified fields.
Term_HAS_FIELDS Term_TermType = 32
// x.with_fields(...) <=> x.has_fields(...).pluck(...)
Term_WITH_FIELDS Term_TermType = 96
// Get a subset of an object by selecting some attributes to preserve,
// or map that over a sequence. (Both pick and pluck, polymorphic.)
Term_PLUCK Term_TermType = 33
// Get a subset of an object by selecting some attributes to discard, or
// map that over a sequence. (Both unpick and without, polymorphic.)
Term_WITHOUT Term_TermType = 34
// Merge objects (right-preferential)
Term_MERGE Term_TermType = 35
// Sequence Ops
// Get all elements of a sequence between two values.
// Half-open by default, but the openness of either side can be
// changed by passing 'closed' or 'open for `right_bound` or
// `left_bound`.
Term_BETWEEN_DEPRECATED Term_TermType = 36
// With the newer version, clients should use `r.minval` and `r.maxval` for unboundedness
Term_BETWEEN Term_TermType = 182
Term_REDUCE Term_TermType = 37
Term_MAP Term_TermType = 38
Term_FOLD Term_TermType = 187
// Filter a sequence with either a function or a shortcut
// object (see API docs for details). The body of FILTER is
// wrapped in an implicit `.default(false)`, and you can
// change the default value by specifying the `default`
// optarg. If you make the default `r.error`, all errors
// caught by `default` will be rethrown as if the `default`
// did not exist.
Term_FILTER Term_TermType = 39
// Sequence, OBJECT, {default:DATUM} -> Sequence
// Map a function over a sequence and then concatenate the results together.
Term_CONCAT_MAP Term_TermType = 40
// Order a sequence based on one or more attributes.
Term_ORDER_BY Term_TermType = 41
// Get all distinct elements of a sequence (like `uniq`).
Term_DISTINCT Term_TermType = 42
// Count the number of elements in a sequence, or only the elements that match
// a given filter.
Term_COUNT Term_TermType = 43
Term_IS_EMPTY Term_TermType = 86
// Take the union of multiple sequences (preserves duplicate elements! (use distinct)).
Term_UNION Term_TermType = 44
// Get the Nth element of a sequence.
Term_NTH Term_TermType = 45
// do NTH or GET_FIELD depending on target object
Term_BRACKET Term_TermType = 170
Term_INNER_JOIN Term_TermType = 48
Term_OUTER_JOIN Term_TermType = 49
// An inner-join that does an equality comparison on two attributes.
Term_EQ_JOIN Term_TermType = 50
Term_ZIP Term_TermType = 72
Term_RANGE Term_TermType = 173
// Array Ops
// Insert an element in to an array at a given index.
Term_INSERT_AT Term_TermType = 82
// Remove an element at a given index from an array.
Term_DELETE_AT Term_TermType = 83
// ARRAY, NUMBER, NUMBER -> ARRAY
// Change the element at a given index of an array.
Term_CHANGE_AT Term_TermType = 84
// Splice one array in to another array.
Term_SPLICE_AT Term_TermType = 85
// * Type Ops
// Coerces a datum to a named type (e.g. "bool").
// If you previously used `stream_to_array`, you should use this instead
// with the type "array".
Term_COERCE_TO Term_TermType = 51
// Returns the named type of a datum (e.g. TYPE_OF(true) = "BOOL")
Term_TYPE_OF Term_TermType = 52
// * Write Ops (the OBJECTs contain data about number of errors etc.)
// Updates all the rows in a selection. Calls its Function with the row
// to be updated, and then merges the result of that call.
Term_UPDATE Term_TermType = 53
// SingleSelection, Function(1), {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT |
// StreamSelection, OBJECT, {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT |
// SingleSelection, OBJECT, {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT
// Deletes all the rows in a selection.
Term_DELETE Term_TermType = 54
// Replaces all the rows in a selection. Calls its Function with the row
// to be replaced, and then discards it and stores the result of that
// call.
Term_REPLACE Term_TermType = 55
// Inserts into a table. If `conflict` is replace, overwrites
// entries with the same primary key. If `conflict` is
// update, does an update on the entry. If `conflict` is
// error, or is omitted, conflicts will trigger an error.
Term_INSERT Term_TermType = 56
// * Administrative OPs
// Creates a database with a particular name.
Term_DB_CREATE Term_TermType = 57
// Drops a database with a particular name.
Term_DB_DROP Term_TermType = 58
// Lists all the databases by name. (Takes no arguments)
Term_DB_LIST Term_TermType = 59
// Creates a table with a particular name in a particular
// database. (You may omit the first argument to use the
// default database.)
Term_TABLE_CREATE Term_TermType = 60
// Database, STRING, {primary_key:STRING, shards:NUMBER, replicas:OBJECT, primary_replica_tag:STRING} -> OBJECT
// STRING, {primary_key:STRING, shards:NUMBER, replicas:NUMBER, primary_replica_tag:STRING} -> OBJECT
// STRING, {primary_key:STRING, shards:NUMBER, replicas:OBJECT, primary_replica_tag:STRING} -> OBJECT
// Drops a table with a particular name from a particular
// database. (You may omit the first argument to use the
// default database.)
Term_TABLE_DROP Term_TermType = 61
// STRING -> OBJECT
// Lists all the tables in a particular database. (You may
// omit the first argument to use the default database.)
Term_TABLE_LIST Term_TermType = 62
// -> ARRAY
// Returns the row in the `rethinkdb.table_config` or `rethinkdb.db_config` table
// that corresponds to the given database or table.
Term_CONFIG Term_TermType = 174
// Table -> SingleSelection
// Returns the row in the `rethinkdb.table_status` table that corresponds to the
// given table.
Term_STATUS Term_TermType = 175
// Called on a table, waits for that table to be ready for read/write operations.
// Called on a database, waits for all of the tables in the database to be ready.
// Returns the corresponding row or rows from the `rethinkdb.table_status` table.
Term_WAIT Term_TermType = 177
// Database -> OBJECT
// Generates a new config for the given table, or all tables in the given database
// The `shards` and `replicas` arguments are required. If `emergency_repair` is
// specified, it will enter a completely different mode of repairing a table
// which has lost half or more of its replicas.
Term_RECONFIGURE Term_TermType = 176
// dry_run:BOOLEAN]
// } -> OBJECT
// Database|Table, {shards:NUMBER, replicas:OBJECT [,
// primary_replica_tag:STRING,
// nonvoting_replica_tags:ARRAY,
// dry_run:BOOLEAN]
// } -> OBJECT
// Table, {emergency_repair:STRING, dry_run:BOOLEAN} -> OBJECT
// Balances the table's shards but leaves everything else the same. Can also be
// applied to an entire database at once.
Term_REBALANCE Term_TermType = 179
// Ensures that previously issued soft-durability writes are complete and
// written to disk.
Term_SYNC Term_TermType = 138
// Set global, database, or table-specific permissions
Term_GRANT Term_TermType = 188
// * Secondary indexes OPs
// Creates a new secondary index with a particular name and definition.
Term_INDEX_CREATE Term_TermType = 75
// Drops a secondary index with a particular name from the specified table.
Term_INDEX_DROP Term_TermType = 76
// Lists all secondary indexes on a particular table.
Term_INDEX_LIST Term_TermType = 77
// Gets information about whether or not a set of indexes are ready to
// be accessed. Returns a list of objects that look like this:
// {index:STRING, ready:BOOL[, progress:NUMBER]}
Term_INDEX_STATUS Term_TermType = 139
// Blocks until a set of indexes are ready to be accessed. Returns the
// same values INDEX_STATUS.
Term_INDEX_WAIT Term_TermType = 140
// Renames the given index to a new name
Term_INDEX_RENAME Term_TermType = 156
// * Write hook Function OPs
// Creates a new write hook function with a particular definition
Term_SET_WRITE_HOOK Term_TermType = 189
// Gets an existing write hook function on a table
Term_GET_WRITE_HOOK Term_TermType = 190
// * Control Operators
// Calls a function on data
Term_FUNCALL Term_TermType = 64
// Executes its first argument, and returns its second argument if it
// got [true] or its third argument if it got [false] (like an `if`
// statement).
Term_BRANCH Term_TermType = 65
// Returns true if any of its arguments returns true (short-circuits).
Term_OR Term_TermType = 66
// Returns true if all of its arguments return true (short-circuits).
Term_AND Term_TermType = 67
// Calls its Function with each entry in the sequence
// and executes the array of terms that Function returns.
Term_FOR_EACH Term_TermType = 68
// An anonymous function. Takes an array of numbers representing
// variables (see [VAR] above), and a [Term] to execute with those in
// scope. Returns a function that may be passed an array of arguments,
// then executes the Term with those bound to the variable names. The
// user will never construct this directly. We use it internally for
// things like `map` which take a function. The "arity" of a [Function] is
// the number of arguments it takes.
// For example, here's what `_X_.map{|x| x+2}` turns into:
// Term {
// type = MAP;
// args = [_X_,
// Term {
// type = Function;
// args = [Term {
// type = DATUM;
// datum = Datum {
// type = R_ARRAY;
// r_array = [Datum { type = R_NUM; r_num = 1; }];
// };
// },
// Term {
// type = ADD;
// args = [Term {
// type = VAR;
// args = [Term {
// type = DATUM;
// datum = Datum { type = R_NUM;
// r_num = 1};
// }];
// },
// Term {
// type = DATUM;
// datum = Datum { type = R_NUM; r_num = 2; };
// }];
// }];
// }];
Term_FUNC Term_TermType = 69
// Indicates to ORDER_BY that this attribute is to be sorted in ascending order.
Term_ASC Term_TermType = 73
// Indicates to ORDER_BY that this attribute is to be sorted in descending order.
Term_DESC Term_TermType = 74
// Gets info about anything. INFO is most commonly called on tables.
Term_INFO Term_TermType = 79
// `a.match(b)` returns a match object if the string `a`
// matches the regular expression `b`.
Term_MATCH Term_TermType = 97
// Change the case of a string.
Term_UPCASE Term_TermType = 141
Term_DOWNCASE Term_TermType = 142
// Select a number of elements from sequence with uniform distribution.
Term_SAMPLE Term_TermType = 81
// Evaluates its first argument. If that argument returns
// NULL or throws an error related to the absence of an
// expected value (for instance, accessing a non-existent
// field or adding NULL to an integer), DEFAULT will either
// return its second argument or execute it if it's a
// function. If the second argument is a function, it will be
// passed either the text of the error or NULL as its
// argument.
Term_DEFAULT Term_TermType = 92
// Parses its first argument as a json string and returns it as a
// datum.
Term_JSON Term_TermType = 98
// Parses its first arguments as an ISO 8601 time and returns it as a
// datum.
Term_ISO8601 Term_TermType = 99
// Prints a time as an ISO 8601 time.
Term_TO_ISO8601 Term_TermType = 100
// Returns a time given seconds since epoch in UTC.
Term_EPOCH_TIME Term_TermType = 101
// Returns seconds since epoch in UTC given a time.
Term_TO_EPOCH_TIME Term_TermType = 102
// The time the query was received by the server.
Term_NOW Term_TermType = 103
// Puts a time into an ISO 8601 timezone.
Term_IN_TIMEZONE Term_TermType = 104
// a.during(b, c) returns whether a is in the range [b, c)
Term_DURING Term_TermType = 105
// Retrieves the date portion of a time.
Term_DATE Term_TermType = 106
// x.time_of_day == x.date - x
Term_TIME_OF_DAY Term_TermType = 126
// Returns the timezone of a time.
Term_TIMEZONE Term_TermType = 127
// These access the various components of a time.
Term_YEAR Term_TermType = 128
Term_MONTH Term_TermType = 129
Term_DAY Term_TermType = 130
Term_DAY_OF_WEEK Term_TermType = 131
Term_DAY_OF_YEAR Term_TermType = 132
Term_HOURS Term_TermType = 133
Term_MINUTES Term_TermType = 134
Term_SECONDS Term_TermType = 135
// Construct a time from a date and optional timezone or a
// date+time and optional timezone.
Term_TIME Term_TermType = 136
// Constants for ISO 8601 days of the week.
Term_MONDAY Term_TermType = 107
Term_TUESDAY Term_TermType = 108
Term_WEDNESDAY Term_TermType = 109
Term_THURSDAY Term_TermType = 110
Term_FRIDAY Term_TermType = 111
Term_SATURDAY Term_TermType = 112
Term_SUNDAY Term_TermType = 113
// Constants for ISO 8601 months.
Term_JANUARY Term_TermType = 114
Term_FEBRUARY Term_TermType = 115
Term_MARCH Term_TermType = 116
Term_APRIL Term_TermType = 117
Term_MAY Term_TermType = 118
Term_JUNE Term_TermType = 119
Term_JULY Term_TermType = 120
Term_AUGUST Term_TermType = 121
Term_SEPTEMBER Term_TermType = 122
Term_OCTOBER Term_TermType = 123
Term_NOVEMBER Term_TermType = 124
Term_DECEMBER Term_TermType = 125
// Indicates to MERGE to replace, or remove in case of an empty literal, the
// other object rather than merge it.
Term_LITERAL Term_TermType = 137
// SEQUENCE, STRING -> GROUPED_SEQUENCE | SEQUENCE, FUNCTION -> GROUPED_SEQUENCE
Term_GROUP Term_TermType = 144
Term_SUM Term_TermType = 145
Term_AVG Term_TermType = 146
Term_MIN Term_TermType = 147
Term_MAX Term_TermType = 148
// `str.split()` splits on whitespace
// `str.split(" ")` splits on spaces only
// `str.split(" ", 5)` splits on spaces with at most 5 results
// `str.split(nil, 5)` splits on whitespace with at most 5 results
Term_SPLIT Term_TermType = 149
Term_UNGROUP Term_TermType = 150
// Takes a range of numbers and returns a random number within the range
Term_RANDOM Term_TermType = 151
Term_CHANGES Term_TermType = 152
Term_ARGS Term_TermType = 154
// BINARY is client-only at the moment, it is not supported on the server
Term_BINARY Term_TermType = 155
Term_GEOJSON Term_TermType = 157
Term_TO_GEOJSON Term_TermType = 158
Term_POINT Term_TermType = 159
Term_LINE Term_TermType = 160
Term_POLYGON Term_TermType = 161
Term_DISTANCE Term_TermType = 162
Term_INTERSECTS Term_TermType = 163
Term_INCLUDES Term_TermType = 164
Term_CIRCLE Term_TermType = 165
Term_GET_INTERSECTING Term_TermType = 166
Term_FILL Term_TermType = 167
Term_GET_NEAREST Term_TermType = 168
Term_POLYGON_SUB Term_TermType = 171
// Returns the datum as a JSON string.
// N.B.: we would really prefer this be named TO_JSON and that exists as
// an alias in Python and JavaScript drivers; however it conflicts with the
// standard `to_json` method defined by Ruby's standard json library.
Term_TO_JSON_STRING Term_TermType = 172
// Constants for specifying key ranges
Term_MINVAL Term_TermType = 180
Term_MAXVAL Term_TermType = 181
// Bitwise operations
Term_BIT_AND Term_TermType = 191
Term_BIT_OR Term_TermType = 192
Term_BIT_XOR Term_TermType = 193
Term_BIT_NOT Term_TermType = 194
Term_BIT_SAL Term_TermType = 195
Term_BIT_SAR Term_TermType = 196
)
var Term_TermType_name = map[int32]string{
1: "DATUM",
2: "MAKE_ARRAY",
3: "MAKE_OBJ",
10: "VAR",
11: "JAVASCRIPT",
169: "UUID",
153: "HTTP",
12: "ERROR",
13: "IMPLICIT_VAR",
14: "DB",
15: "TABLE",
16: "GET",
78: "GET_ALL",
17: "EQ",
18: "NE",
19: "LT",
20: "LE",
21: "GT",
22: "GE",
23: "NOT",
24: "ADD",
25: "SUB",
26: "MUL",
27: "DIV",
28: "MOD",
183: "FLOOR",
184: "CEIL",
185: "ROUND",
29: "APPEND",
80: "PREPEND",
95: "DIFFERENCE",
88: "SET_INSERT",
89: "SET_INTERSECTION",
90: "SET_UNION",
91: "SET_DIFFERENCE",
30: "SLICE",
70: "SKIP",
71: "LIMIT",
87: "OFFSETS_OF",
93: "CONTAINS",
31: "GET_FIELD",
94: "KEYS",
186: "VALUES",
143: "OBJECT",
32: "HAS_FIELDS",
96: "WITH_FIELDS",
33: "PLUCK",
34: "WITHOUT",
35: "MERGE",
36: "BETWEEN_DEPRECATED",
182: "BETWEEN",
37: "REDUCE",
38: "MAP",
187: "FOLD",
39: "FILTER",
40: "CONCAT_MAP",
41: "ORDER_BY",
42: "DISTINCT",
43: "COUNT",
86: "IS_EMPTY",
44: "UNION",
45: "NTH",
170: "BRACKET",
48: "INNER_JOIN",
49: "OUTER_JOIN",
50: "EQ_JOIN",
72: "ZIP",
173: "RANGE",
82: "INSERT_AT",
83: "DELETE_AT",
84: "CHANGE_AT",
85: "SPLICE_AT",
51: "COERCE_TO",
52: "TYPE_OF",
53: "UPDATE",
54: "DELETE",
55: "REPLACE",
56: "INSERT",
57: "DB_CREATE",
58: "DB_DROP",
59: "DB_LIST",
60: "TABLE_CREATE",
61: "TABLE_DROP",
62: "TABLE_LIST",
174: "CONFIG",
175: "STATUS",
177: "WAIT",
176: "RECONFIGURE",
179: "REBALANCE",
138: "SYNC",
188: "GRANT",
75: "INDEX_CREATE",
76: "INDEX_DROP",
77: "INDEX_LIST",
139: "INDEX_STATUS",
140: "INDEX_WAIT",
156: "INDEX_RENAME",
189: "SET_WRITE_HOOK",
190: "GET_WRITE_HOOK",
64: "FUNCALL",
65: "BRANCH",
66: "OR",
67: "AND",
68: "FOR_EACH",
69: "FUNC",
73: "ASC",
74: "DESC",
79: "INFO",
97: "MATCH",
141: "UPCASE",
142: "DOWNCASE",
81: "SAMPLE",
92: "DEFAULT",
98: "JSON",
99: "ISO8601",
100: "TO_ISO8601",
101: "EPOCH_TIME",
102: "TO_EPOCH_TIME",
103: "NOW",
104: "IN_TIMEZONE",
105: "DURING",
106: "DATE",
126: "TIME_OF_DAY",
127: "TIMEZONE",
128: "YEAR",
129: "MONTH",
130: "DAY",
131: "DAY_OF_WEEK",
132: "DAY_OF_YEAR",
133: "HOURS",
134: "MINUTES",
135: "SECONDS",
136: "TIME",
107: "MONDAY",
108: "TUESDAY",
109: "WEDNESDAY",
110: "THURSDAY",
111: "FRIDAY",
112: "SATURDAY",