forked from orthecreedence/cl-rethinkdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocol.lisp
2668 lines (2393 loc) · 108 KB
/
protocol.lisp
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
;;;; protocol.lisp
;;; Generated by the protocol buffer compiler. DO NOT EDIT!
(cl:in-package #:common-lisp-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package '#:cl-rethinkdb-proto)
(make-package '#:cl-rethinkdb-proto :use nil)))
(in-package #:cl-rethinkdb-proto)
(cl:declaim #.com.google.base:*optimize-default*)
(cl:deftype version-dummy-version () '(cl:member 1063369270 1915781601))
(cl:export 'version-dummy-version)
(cl:defconstant +version-dummy-version-v0-1+ 1063369270)
(cl:export '+version-dummy-version-v0-1+)
(cl:defconstant +version-dummy-version-v0-2+ 1915781601)
(cl:export '+version-dummy-version-v0-2+)
(cl:defconstant +minimum-version-dummy-version+ +version-dummy-version-v0-1+)
(cl:export '+minimum-version-dummy-version+)
(cl:defconstant +maximum-version-dummy-version+ +version-dummy-version-v0-2+)
(cl:export '+maximum-version-dummy-version+)
(cl:deftype query-query-type () '(cl:member 1 2 3 4))
(cl:export 'query-query-type)
(cl:defconstant +query-query-type-start+ 1)
(cl:export '+query-query-type-start+)
(cl:defconstant +query-query-type-continue+ 2)
(cl:export '+query-query-type-continue+)
(cl:defconstant +query-query-type-stop+ 3)
(cl:export '+query-query-type-stop+)
(cl:defconstant +query-query-type-noreply-wait+ 4)
(cl:export '+query-query-type-noreply-wait+)
(cl:defconstant +minimum-query-query-type+ +query-query-type-start+)
(cl:export '+minimum-query-query-type+)
(cl:defconstant +maximum-query-query-type+ +query-query-type-noreply-wait+)
(cl:export '+maximum-query-query-type+)
(cl:deftype frame-frame-type () '(cl:member 1 2))
(cl:export 'frame-frame-type)
(cl:defconstant +frame-frame-type-pos+ 1)
(cl:export '+frame-frame-type-pos+)
(cl:defconstant +frame-frame-type-opt+ 2)
(cl:export '+frame-frame-type-opt+)
(cl:defconstant +minimum-frame-frame-type+ +frame-frame-type-pos+)
(cl:export '+minimum-frame-frame-type+)
(cl:defconstant +maximum-frame-frame-type+ +frame-frame-type-opt+)
(cl:export '+maximum-frame-frame-type+)
(cl:deftype response-response-type () '(cl:member 1 2 3 4 16 17 18))
(cl:export 'response-response-type)
(cl:defconstant +response-response-type-success-atom+ 1)
(cl:export '+response-response-type-success-atom+)
(cl:defconstant +response-response-type-success-sequence+ 2)
(cl:export '+response-response-type-success-sequence+)
(cl:defconstant +response-response-type-success-partial+ 3)
(cl:export '+response-response-type-success-partial+)
(cl:defconstant +response-response-type-wait-complete+ 4)
(cl:export '+response-response-type-wait-complete+)
(cl:defconstant +response-response-type-client-error+ 16)
(cl:export '+response-response-type-client-error+)
(cl:defconstant +response-response-type-compile-error+ 17)
(cl:export '+response-response-type-compile-error+)
(cl:defconstant +response-response-type-runtime-error+ 18)
(cl:export '+response-response-type-runtime-error+)
(cl:defconstant +minimum-response-response-type+ +response-response-type-success-atom+)
(cl:export '+minimum-response-response-type+)
(cl:defconstant +maximum-response-response-type+ +response-response-type-runtime-error+)
(cl:export '+maximum-response-response-type+)
(cl:deftype datum-datum-type () '(cl:member 1 2 3 4 5 6 7))
(cl:export 'datum-datum-type)
(cl:defconstant +datum-datum-type-r-null+ 1)
(cl:export '+datum-datum-type-r-null+)
(cl:defconstant +datum-datum-type-r-bool+ 2)
(cl:export '+datum-datum-type-r-bool+)
(cl:defconstant +datum-datum-type-r-num+ 3)
(cl:export '+datum-datum-type-r-num+)
(cl:defconstant +datum-datum-type-r-str+ 4)
(cl:export '+datum-datum-type-r-str+)
(cl:defconstant +datum-datum-type-r-array+ 5)
(cl:export '+datum-datum-type-r-array+)
(cl:defconstant +datum-datum-type-r-object+ 6)
(cl:export '+datum-datum-type-r-object+)
(cl:defconstant +datum-datum-type-r-json+ 7)
(cl:export '+datum-datum-type-r-json+)
(cl:defconstant +minimum-datum-datum-type+ +datum-datum-type-r-null+)
(cl:export '+minimum-datum-datum-type+)
(cl:defconstant +maximum-datum-datum-type+ +datum-datum-type-r-json+)
(cl:export '+maximum-datum-datum-type+)
(cl:deftype term-term-type () '(cl:member 1 2 3 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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 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))
(cl:export 'term-term-type)
(cl:defconstant +term-term-type-datum+ 1)
(cl:export '+term-term-type-datum+)
(cl:defconstant +term-term-type-make-array+ 2)
(cl:export '+term-term-type-make-array+)
(cl:defconstant +term-term-type-make-obj+ 3)
(cl:export '+term-term-type-make-obj+)
(cl:defconstant +term-term-type-var+ 10)
(cl:export '+term-term-type-var+)
(cl:defconstant +term-term-type-javascript+ 11)
(cl:export '+term-term-type-javascript+)
(cl:defconstant +term-term-type-error+ 12)
(cl:export '+term-term-type-error+)
(cl:defconstant +term-term-type-implicit-var+ 13)
(cl:export '+term-term-type-implicit-var+)
(cl:defconstant +term-term-type-db+ 14)
(cl:export '+term-term-type-db+)
(cl:defconstant +term-term-type-table+ 15)
(cl:export '+term-term-type-table+)
(cl:defconstant +term-term-type-get+ 16)
(cl:export '+term-term-type-get+)
(cl:defconstant +term-term-type-get-all+ 78)
(cl:export '+term-term-type-get-all+)
(cl:defconstant +term-term-type-eq+ 17)
(cl:export '+term-term-type-eq+)
(cl:defconstant +term-term-type-ne+ 18)
(cl:export '+term-term-type-ne+)
(cl:defconstant +term-term-type-lt+ 19)
(cl:export '+term-term-type-lt+)
(cl:defconstant +term-term-type-le+ 20)
(cl:export '+term-term-type-le+)
(cl:defconstant +term-term-type-gt+ 21)
(cl:export '+term-term-type-gt+)
(cl:defconstant +term-term-type-ge+ 22)
(cl:export '+term-term-type-ge+)
(cl:defconstant +term-term-type-not+ 23)
(cl:export '+term-term-type-not+)
(cl:defconstant +term-term-type-add+ 24)
(cl:export '+term-term-type-add+)
(cl:defconstant +term-term-type-sub+ 25)
(cl:export '+term-term-type-sub+)
(cl:defconstant +term-term-type-mul+ 26)
(cl:export '+term-term-type-mul+)
(cl:defconstant +term-term-type-div+ 27)
(cl:export '+term-term-type-div+)
(cl:defconstant +term-term-type-mod+ 28)
(cl:export '+term-term-type-mod+)
(cl:defconstant +term-term-type-append+ 29)
(cl:export '+term-term-type-append+)
(cl:defconstant +term-term-type-prepend+ 80)
(cl:export '+term-term-type-prepend+)
(cl:defconstant +term-term-type-difference+ 95)
(cl:export '+term-term-type-difference+)
(cl:defconstant +term-term-type-set-insert+ 88)
(cl:export '+term-term-type-set-insert+)
(cl:defconstant +term-term-type-set-intersection+ 89)
(cl:export '+term-term-type-set-intersection+)
(cl:defconstant +term-term-type-set-union+ 90)
(cl:export '+term-term-type-set-union+)
(cl:defconstant +term-term-type-set-difference+ 91)
(cl:export '+term-term-type-set-difference+)
(cl:defconstant +term-term-type-slice+ 30)
(cl:export '+term-term-type-slice+)
(cl:defconstant +term-term-type-skip+ 70)
(cl:export '+term-term-type-skip+)
(cl:defconstant +term-term-type-limit+ 71)
(cl:export '+term-term-type-limit+)
(cl:defconstant +term-term-type-indexes-of+ 87)
(cl:export '+term-term-type-indexes-of+)
(cl:defconstant +term-term-type-contains+ 93)
(cl:export '+term-term-type-contains+)
(cl:defconstant +term-term-type-get-field+ 31)
(cl:export '+term-term-type-get-field+)
(cl:defconstant +term-term-type-keys+ 94)
(cl:export '+term-term-type-keys+)
(cl:defconstant +term-term-type-object+ 143)
(cl:export '+term-term-type-object+)
(cl:defconstant +term-term-type-has-fields+ 32)
(cl:export '+term-term-type-has-fields+)
(cl:defconstant +term-term-type-with-fields+ 96)
(cl:export '+term-term-type-with-fields+)
(cl:defconstant +term-term-type-pluck+ 33)
(cl:export '+term-term-type-pluck+)
(cl:defconstant +term-term-type-without+ 34)
(cl:export '+term-term-type-without+)
(cl:defconstant +term-term-type-merge+ 35)
(cl:export '+term-term-type-merge+)
(cl:defconstant +term-term-type-between+ 36)
(cl:export '+term-term-type-between+)
(cl:defconstant +term-term-type-reduce+ 37)
(cl:export '+term-term-type-reduce+)
(cl:defconstant +term-term-type-map+ 38)
(cl:export '+term-term-type-map+)
(cl:defconstant +term-term-type-filter+ 39)
(cl:export '+term-term-type-filter+)
(cl:defconstant +term-term-type-concatmap+ 40)
(cl:export '+term-term-type-concatmap+)
(cl:defconstant +term-term-type-orderby+ 41)
(cl:export '+term-term-type-orderby+)
(cl:defconstant +term-term-type-distinct+ 42)
(cl:export '+term-term-type-distinct+)
(cl:defconstant +term-term-type-count+ 43)
(cl:export '+term-term-type-count+)
(cl:defconstant +term-term-type-is-empty+ 86)
(cl:export '+term-term-type-is-empty+)
(cl:defconstant +term-term-type-union+ 44)
(cl:export '+term-term-type-union+)
(cl:defconstant +term-term-type-nth+ 45)
(cl:export '+term-term-type-nth+)
(cl:defconstant +term-term-type-inner-join+ 48)
(cl:export '+term-term-type-inner-join+)
(cl:defconstant +term-term-type-outer-join+ 49)
(cl:export '+term-term-type-outer-join+)
(cl:defconstant +term-term-type-eq-join+ 50)
(cl:export '+term-term-type-eq-join+)
(cl:defconstant +term-term-type-zip+ 72)
(cl:export '+term-term-type-zip+)
(cl:defconstant +term-term-type-insert-at+ 82)
(cl:export '+term-term-type-insert-at+)
(cl:defconstant +term-term-type-delete-at+ 83)
(cl:export '+term-term-type-delete-at+)
(cl:defconstant +term-term-type-change-at+ 84)
(cl:export '+term-term-type-change-at+)
(cl:defconstant +term-term-type-splice-at+ 85)
(cl:export '+term-term-type-splice-at+)
(cl:defconstant +term-term-type-coerce-to+ 51)
(cl:export '+term-term-type-coerce-to+)
(cl:defconstant +term-term-type-typeof+ 52)
(cl:export '+term-term-type-typeof+)
(cl:defconstant +term-term-type-update+ 53)
(cl:export '+term-term-type-update+)
(cl:defconstant +term-term-type-delete+ 54)
(cl:export '+term-term-type-delete+)
(cl:defconstant +term-term-type-replace+ 55)
(cl:export '+term-term-type-replace+)
(cl:defconstant +term-term-type-insert+ 56)
(cl:export '+term-term-type-insert+)
(cl:defconstant +term-term-type-db-create+ 57)
(cl:export '+term-term-type-db-create+)
(cl:defconstant +term-term-type-db-drop+ 58)
(cl:export '+term-term-type-db-drop+)
(cl:defconstant +term-term-type-db-list+ 59)
(cl:export '+term-term-type-db-list+)
(cl:defconstant +term-term-type-table-create+ 60)
(cl:export '+term-term-type-table-create+)
(cl:defconstant +term-term-type-table-drop+ 61)
(cl:export '+term-term-type-table-drop+)
(cl:defconstant +term-term-type-table-list+ 62)
(cl:export '+term-term-type-table-list+)
(cl:defconstant +term-term-type-sync+ 138)
(cl:export '+term-term-type-sync+)
(cl:defconstant +term-term-type-index-create+ 75)
(cl:export '+term-term-type-index-create+)
(cl:defconstant +term-term-type-index-drop+ 76)
(cl:export '+term-term-type-index-drop+)
(cl:defconstant +term-term-type-index-list+ 77)
(cl:export '+term-term-type-index-list+)
(cl:defconstant +term-term-type-index-status+ 139)
(cl:export '+term-term-type-index-status+)
(cl:defconstant +term-term-type-index-wait+ 140)
(cl:export '+term-term-type-index-wait+)
(cl:defconstant +term-term-type-funcall+ 64)
(cl:export '+term-term-type-funcall+)
(cl:defconstant +term-term-type-branch+ 65)
(cl:export '+term-term-type-branch+)
(cl:defconstant +term-term-type-any+ 66)
(cl:export '+term-term-type-any+)
(cl:defconstant +term-term-type-all+ 67)
(cl:export '+term-term-type-all+)
(cl:defconstant +term-term-type-foreach+ 68)
(cl:export '+term-term-type-foreach+)
(cl:defconstant +term-term-type-func+ 69)
(cl:export '+term-term-type-func+)
(cl:defconstant +term-term-type-asc+ 73)
(cl:export '+term-term-type-asc+)
(cl:defconstant +term-term-type-desc+ 74)
(cl:export '+term-term-type-desc+)
(cl:defconstant +term-term-type-info+ 79)
(cl:export '+term-term-type-info+)
(cl:defconstant +term-term-type-match+ 97)
(cl:export '+term-term-type-match+)
(cl:defconstant +term-term-type-upcase+ 141)
(cl:export '+term-term-type-upcase+)
(cl:defconstant +term-term-type-downcase+ 142)
(cl:export '+term-term-type-downcase+)
(cl:defconstant +term-term-type-sample+ 81)
(cl:export '+term-term-type-sample+)
(cl:defconstant +term-term-type-default+ 92)
(cl:export '+term-term-type-default+)
(cl:defconstant +term-term-type-json+ 98)
(cl:export '+term-term-type-json+)
(cl:defconstant +term-term-type-iso8601+ 99)
(cl:export '+term-term-type-iso8601+)
(cl:defconstant +term-term-type-to-iso8601+ 100)
(cl:export '+term-term-type-to-iso8601+)
(cl:defconstant +term-term-type-epoch-time+ 101)
(cl:export '+term-term-type-epoch-time+)
(cl:defconstant +term-term-type-to-epoch-time+ 102)
(cl:export '+term-term-type-to-epoch-time+)
(cl:defconstant +term-term-type-now+ 103)
(cl:export '+term-term-type-now+)
(cl:defconstant +term-term-type-in-timezone+ 104)
(cl:export '+term-term-type-in-timezone+)
(cl:defconstant +term-term-type-during+ 105)
(cl:export '+term-term-type-during+)
(cl:defconstant +term-term-type-date+ 106)
(cl:export '+term-term-type-date+)
(cl:defconstant +term-term-type-time-of-day+ 126)
(cl:export '+term-term-type-time-of-day+)
(cl:defconstant +term-term-type-timezone+ 127)
(cl:export '+term-term-type-timezone+)
(cl:defconstant +term-term-type-year+ 128)
(cl:export '+term-term-type-year+)
(cl:defconstant +term-term-type-month+ 129)
(cl:export '+term-term-type-month+)
(cl:defconstant +term-term-type-day+ 130)
(cl:export '+term-term-type-day+)
(cl:defconstant +term-term-type-day-of-week+ 131)
(cl:export '+term-term-type-day-of-week+)
(cl:defconstant +term-term-type-day-of-year+ 132)
(cl:export '+term-term-type-day-of-year+)
(cl:defconstant +term-term-type-hours+ 133)
(cl:export '+term-term-type-hours+)
(cl:defconstant +term-term-type-minutes+ 134)
(cl:export '+term-term-type-minutes+)
(cl:defconstant +term-term-type-seconds+ 135)
(cl:export '+term-term-type-seconds+)
(cl:defconstant +term-term-type-time+ 136)
(cl:export '+term-term-type-time+)
(cl:defconstant +term-term-type-monday+ 107)
(cl:export '+term-term-type-monday+)
(cl:defconstant +term-term-type-tuesday+ 108)
(cl:export '+term-term-type-tuesday+)
(cl:defconstant +term-term-type-wednesday+ 109)
(cl:export '+term-term-type-wednesday+)
(cl:defconstant +term-term-type-thursday+ 110)
(cl:export '+term-term-type-thursday+)
(cl:defconstant +term-term-type-friday+ 111)
(cl:export '+term-term-type-friday+)
(cl:defconstant +term-term-type-saturday+ 112)
(cl:export '+term-term-type-saturday+)
(cl:defconstant +term-term-type-sunday+ 113)
(cl:export '+term-term-type-sunday+)
(cl:defconstant +term-term-type-january+ 114)
(cl:export '+term-term-type-january+)
(cl:defconstant +term-term-type-february+ 115)
(cl:export '+term-term-type-february+)
(cl:defconstant +term-term-type-march+ 116)
(cl:export '+term-term-type-march+)
(cl:defconstant +term-term-type-april+ 117)
(cl:export '+term-term-type-april+)
(cl:defconstant +term-term-type-may+ 118)
(cl:export '+term-term-type-may+)
(cl:defconstant +term-term-type-june+ 119)
(cl:export '+term-term-type-june+)
(cl:defconstant +term-term-type-july+ 120)
(cl:export '+term-term-type-july+)
(cl:defconstant +term-term-type-august+ 121)
(cl:export '+term-term-type-august+)
(cl:defconstant +term-term-type-september+ 122)
(cl:export '+term-term-type-september+)
(cl:defconstant +term-term-type-october+ 123)
(cl:export '+term-term-type-october+)
(cl:defconstant +term-term-type-november+ 124)
(cl:export '+term-term-type-november+)
(cl:defconstant +term-term-type-december+ 125)
(cl:export '+term-term-type-december+)
(cl:defconstant +term-term-type-literal+ 137)
(cl:export '+term-term-type-literal+)
(cl:defconstant +term-term-type-group+ 144)
(cl:export '+term-term-type-group+)
(cl:defconstant +term-term-type-sum+ 145)
(cl:export '+term-term-type-sum+)
(cl:defconstant +term-term-type-avg+ 146)
(cl:export '+term-term-type-avg+)
(cl:defconstant +term-term-type-min+ 147)
(cl:export '+term-term-type-min+)
(cl:defconstant +term-term-type-max+ 148)
(cl:export '+term-term-type-max+)
(cl:defconstant +term-term-type-split+ 149)
(cl:export '+term-term-type-split+)
(cl:defconstant +term-term-type-ungroup+ 150)
(cl:export '+term-term-type-ungroup+)
(cl:defconstant +minimum-term-term-type+ +term-term-type-datum+)
(cl:export '+minimum-term-term-type+)
(cl:defconstant +maximum-term-term-type+ +term-term-type-ungroup+)
(cl:export '+maximum-term-term-type+)
(cl:defclass version-dummy (pb:protocol-buffer)
(
(pb::%cached-size%
:initform 0
:type (cl:integer 0 #.(cl:1- cl:array-dimension-limit)))
))
(cl:export 'version-dummy)
(cl:defmethod cl:print-object ((self version-dummy) stream)
(cl:pprint-logical-block (stream cl:nil)
(cl:print-unreadable-object (self stream :type cl:t :identity cl:t)
))
(cl:values))
(cl:defmethod pb:clear ((self version-dummy))
(cl:setf (cl:slot-value self '%has-bits%) 0)
(cl:values))
(cl:defmethod pb:is-initialized ((self version-dummy))
cl:t)
(cl:defmethod pb:octet-size ((self version-dummy))
(cl:let ((size 0))
(cl:setf (cl:slot-value self 'pb::%cached-size%) size)
size))
(cl:defmethod pb:serialize ((self version-dummy) buffer index limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index index limit)
(cl:ignorable buffer limit))
index)
(cl:defmethod pb:merge-from-array ((self version-dummy) buffer start limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index start limit))
(cl:do ((index start index))
((cl:>= index limit) index)
(cl:declare (cl:type com.google.base:vector-index index))
(cl:multiple-value-bind (tag new-index)
(varint:parse-uint32-carefully buffer index limit)
(cl:setf index new-index)
(cl:case tag
(cl:t
(cl:when (cl:= (cl:logand tag 7) 4)
(cl:return-from pb:merge-from-array index))
(cl:setf index (wire-format:skip-field buffer index limit tag)))))))
(cl:defmethod pb:merge-from-message ((self version-dummy) (from version-dummy))
)
(cl:defclass query-assoc-pair (pb:protocol-buffer)
(
(key
:accessor key
:initform (pb:string-field "")
:type pb::%sf%)
(val
:writer (cl:setf val)
:initform cl:nil
:type (cl:or cl:null cl-rethinkdb-proto::term))
(%has-bits%
:accessor %has-bits%
:initform 0
:type (cl:unsigned-byte 2))
(pb::%cached-size%
:initform 0
:type (cl:integer 0 #.(cl:1- cl:array-dimension-limit)))
))
(cl:export 'query-assoc-pair)
(cl:export 'key)
(cl:defmethod (cl:setf key) :after (x (self query-assoc-pair))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-key)
(cl:defgeneric has-key (proto)))
(cl:defmethod has-key ((self query-assoc-pair))
(cl:logbitp 0 (cl:slot-value self '%has-bits%)))
(cl:export 'has-key)
(cl:unless (cl:fboundp 'clear-key)
(cl:defgeneric clear-key (proto)))
(cl:defmethod clear-key ((self query-assoc-pair))
(cl:setf (cl:slot-value self 'key) (pb:string-field ""))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-key)
(cl:export 'val)
(cl:unless (cl:fboundp 'val)
(cl:defgeneric val (proto)))
(cl:defmethod val ((self query-assoc-pair))
(cl:let ((result (cl:slot-value self 'val)))
(cl:when (cl:null result)
(cl:setf result (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'val) result))
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1)
result))
(cl:defmethod (cl:setf val) :after (x (self query-assoc-pair))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-val)
(cl:defgeneric has-val (proto)))
(cl:defmethod has-val ((self query-assoc-pair))
(cl:logbitp 1 (cl:slot-value self '%has-bits%)))
(cl:export 'has-val)
(cl:unless (cl:fboundp 'clear-val)
(cl:defgeneric clear-val (proto)))
(cl:defmethod clear-val ((self query-assoc-pair))
(cl:setf (cl:slot-value self 'val) cl:nil)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-val)
(cl:defclass query (pb:protocol-buffer)
(
(type
:accessor type
:initform cl-rethinkdb-proto::+query-query-type-start+
:type cl-rethinkdb-proto::query-query-type)
(query
:writer (cl:setf query)
:initform cl:nil
:type (cl:or cl:null cl-rethinkdb-proto::term))
(token
:accessor token
:initform 0
:type (cl:signed-byte 64))
(obsolete-noreply
:accessor obsolete-noreply
:initform cl:nil
:type cl:boolean)
(accepts-r-json
:accessor accepts-r-json
:initform cl:nil
:type cl:boolean)
(global-optargs
:accessor global-optargs
:initform (cl:make-array
0
:element-type 'cl-rethinkdb-proto::query-assoc-pair
:fill-pointer 0 :adjustable cl:t)
:type (cl:vector cl-rethinkdb-proto::query-assoc-pair))
(%has-bits%
:accessor %has-bits%
:initform 0
:type (cl:unsigned-byte 6))
(pb::%cached-size%
:initform 0
:type (cl:integer 0 #.(cl:1- cl:array-dimension-limit)))
))
(cl:export 'query)
(cl:export 'type)
(cl:defmethod (cl:setf type) :after (x (self query))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-type)
(cl:defgeneric has-type (proto)))
(cl:defmethod has-type ((self query))
(cl:logbitp 0 (cl:slot-value self '%has-bits%)))
(cl:export 'has-type)
(cl:unless (cl:fboundp 'clear-type)
(cl:defgeneric clear-type (proto)))
(cl:defmethod clear-type ((self query))
(cl:setf (cl:slot-value self 'type) cl-rethinkdb-proto::+query-query-type-start+)
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-type)
(cl:export 'query)
(cl:unless (cl:fboundp 'query)
(cl:defgeneric query (proto)))
(cl:defmethod query ((self query))
(cl:let ((result (cl:slot-value self 'query)))
(cl:when (cl:null result)
(cl:setf result (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'query) result))
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1)
result))
(cl:defmethod (cl:setf query) :after (x (self query))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-query)
(cl:defgeneric has-query (proto)))
(cl:defmethod has-query ((self query))
(cl:logbitp 1 (cl:slot-value self '%has-bits%)))
(cl:export 'has-query)
(cl:unless (cl:fboundp 'clear-query)
(cl:defgeneric clear-query (proto)))
(cl:defmethod clear-query ((self query))
(cl:setf (cl:slot-value self 'query) cl:nil)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-query)
(cl:export 'token)
(cl:defmethod (cl:setf token) :after (x (self query))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 2) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-token)
(cl:defgeneric has-token (proto)))
(cl:defmethod has-token ((self query))
(cl:logbitp 2 (cl:slot-value self '%has-bits%)))
(cl:export 'has-token)
(cl:unless (cl:fboundp 'clear-token)
(cl:defgeneric clear-token (proto)))
(cl:defmethod clear-token ((self query))
(cl:setf (cl:slot-value self 'token) 0)
(cl:setf (cl:ldb (cl:byte 1 2) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-token)
(cl:export 'obsolete-noreply)
(cl:defmethod (cl:setf obsolete-noreply) :after (x (self query))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 3) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-obsolete-noreply)
(cl:defgeneric has-obsolete-noreply (proto)))
(cl:defmethod has-obsolete-noreply ((self query))
(cl:logbitp 3 (cl:slot-value self '%has-bits%)))
(cl:export 'has-obsolete-noreply)
(cl:unless (cl:fboundp 'clear-obsolete-noreply)
(cl:defgeneric clear-obsolete-noreply (proto)))
(cl:defmethod clear-obsolete-noreply ((self query))
(cl:setf (cl:slot-value self 'obsolete-noreply) cl:nil)
(cl:setf (cl:ldb (cl:byte 1 3) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-obsolete-noreply)
(cl:export 'accepts-r-json)
(cl:defmethod (cl:setf accepts-r-json) :after (x (self query))
(cl:declare (cl:ignore x))
(cl:setf (cl:ldb (cl:byte 1 4) (cl:slot-value self '%has-bits%)) 1))
(cl:unless (cl:fboundp 'has-accepts-r-json)
(cl:defgeneric has-accepts-r-json (proto)))
(cl:defmethod has-accepts-r-json ((self query))
(cl:logbitp 4 (cl:slot-value self '%has-bits%)))
(cl:export 'has-accepts-r-json)
(cl:unless (cl:fboundp 'clear-accepts-r-json)
(cl:defgeneric clear-accepts-r-json (proto)))
(cl:defmethod clear-accepts-r-json ((self query))
(cl:setf (cl:slot-value self 'accepts-r-json) cl:nil)
(cl:setf (cl:ldb (cl:byte 1 4) (cl:slot-value self '%has-bits%)) 0)
(cl:values))
(cl:export 'clear-accepts-r-json)
(cl:export 'global-optargs)
(cl:unless (cl:fboundp 'clear-global-optargs)
(cl:defgeneric clear-global-optargs (proto)))
(cl:defmethod clear-global-optargs ((self query))
(cl:setf (cl:slot-value self 'global-optargs)
(cl:make-array 0 :element-type 'cl-rethinkdb-proto::query-assoc-pair
:fill-pointer 0 :adjustable cl:t))
(cl:values))
(cl:export 'clear-global-optargs)
(cl:defmethod cl:print-object ((self query-assoc-pair) stream)
(cl:pprint-logical-block (stream cl:nil)
(cl:print-unreadable-object (self stream :type cl:t :identity cl:t)
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_key: ~s" (key self)))
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_val: ~s" (val self)))
))
(cl:values))
(cl:defmethod pb:clear ((self query-assoc-pair))
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:setf (cl:slot-value self 'key) (pb:string-field "")))
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:setf (cl:slot-value self 'val) cl:nil))
(cl:setf (cl:slot-value self '%has-bits%) 0)
(cl:values))
(cl:defmethod pb:is-initialized ((self query-assoc-pair))
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:unless (pb:is-initialized (cl:slot-value self 'val))
(cl:return-from pb:is-initialized cl:nil)))
cl:t)
(cl:defmethod pb:octet-size ((self query-assoc-pair))
(cl:let ((size 0))
;; optional string key = 1;
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:incf size 1)
(cl:incf size (cl:let ((s (pb::%utf8-string-length% (cl:slot-value self 'key))))
(cl:+ s (varint:length32 s)))))
;; optional .Term val = 2;
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:let ((s (pb:octet-size (cl:slot-value self 'val))))
(cl:incf size (cl:+ 1 s (varint:length32 s)))))
(cl:setf (cl:slot-value self 'pb::%cached-size%) size)
size))
(cl:defmethod pb:serialize ((self query-assoc-pair) buffer index limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index index limit)
(cl:ignorable buffer limit))
;; optional string key = 1;
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 10))
(cl:setf index (wire-format:write-octets-carefully buffer index limit (cl:slot-value (cl:slot-value self 'key) 'pb::%octets%))))
;; optional .Term val = 2;
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 18))
(cl:setf index (varint:encode-uint32-carefully buffer index limit (cl:slot-value (cl:slot-value self 'val) 'pb::%cached-size%)))
(cl:setf index (pb:serialize (cl:slot-value self 'val) buffer index limit)))
index)
(cl:defmethod pb:merge-from-array ((self query-assoc-pair) buffer start limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index start limit))
(cl:do ((index start index))
((cl:>= index limit) index)
(cl:declare (cl:type com.google.base:vector-index index))
(cl:multiple-value-bind (tag new-index)
(varint:parse-uint32-carefully buffer index limit)
(cl:setf index new-index)
(cl:case tag
;; optional string key = 1;
((10)
(cl:multiple-value-bind (value new-index)
(wire-format:read-octets-carefully buffer index limit)
(cl:setf (cl:slot-value self 'key) (pb:string-field value))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1)
(cl:setf index new-index)))
;; optional .Term val = 2;
((18)
(cl:multiple-value-bind (length new-index)
(varint:parse-uint31-carefully buffer index limit)
(cl:when (cl:> (cl:+ new-index length) limit)
(cl:error "buffer overflow"))
(cl:let ((message (cl:slot-value self 'val)))
(cl:when (cl:null message)
(cl:setf message (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'val) message)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(cl:setf index (pb:merge-from-array message buffer new-index (cl:+ new-index length)))
(cl:when (cl:not (cl:= index (cl:+ new-index length)))
(cl:error "buffer overflow")))))
(cl:t
(cl:when (cl:= (cl:logand tag 7) 4)
(cl:return-from pb:merge-from-array index))
(cl:setf index (wire-format:skip-field buffer index limit tag)))))))
(cl:defmethod pb:merge-from-message ((self query-assoc-pair) (from query-assoc-pair))
(cl:when (cl:logbitp 0 (cl:slot-value from '%has-bits%))
(cl:setf (cl:slot-value self 'key) (cl:slot-value from 'key))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1))
(cl:when (cl:logbitp 1 (cl:slot-value from '%has-bits%))
(cl:let ((message (cl:slot-value self 'val)))
(cl:when (cl:null message)
(cl:setf message (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'val) message)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(pb:merge-from-message message (cl:slot-value from 'val))))
)
(cl:defmethod cl:print-object ((self query) stream)
(cl:pprint-logical-block (stream cl:nil)
(cl:print-unreadable-object (self stream :type cl:t :identity cl:t)
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_type: ~s" (type self)))
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_query: ~s" (query self)))
(cl:when (cl:logbitp 2 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_token: ~s" (token self)))
(cl:when (cl:logbitp 3 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_obsolete-noreply: ~s" (obsolete-noreply self)))
(cl:when (cl:logbitp 4 (cl:slot-value self '%has-bits%))
(cl:format stream " ~_accepts-r-json: ~s" (accepts-r-json self)))
(cl:format stream " ~_global-optargs: ~s" (global-optargs self))
))
(cl:values))
(cl:defmethod pb:clear ((self query))
(cl:setf (cl:slot-value self 'type) cl-rethinkdb-proto::+query-query-type-start+)
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:setf (cl:slot-value self 'query) cl:nil))
(cl:setf (cl:slot-value self 'token) 0)
(cl:setf (cl:slot-value self 'obsolete-noreply) cl:nil)
(cl:setf (cl:slot-value self 'accepts-r-json) cl:nil)
(cl:setf (cl:slot-value self 'global-optargs)
(cl:make-array 0 :element-type 'cl-rethinkdb-proto::query-assoc-pair
:fill-pointer 0 :adjustable cl:t))
(cl:setf (cl:slot-value self '%has-bits%) 0)
(cl:values))
(cl:defmethod pb:is-initialized ((self query))
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:unless (pb:is-initialized (cl:slot-value self 'query))
(cl:return-from pb:is-initialized cl:nil)))
(cl:let* ((x (cl:slot-value self 'global-optargs))
(length (cl:length x)))
(cl:dotimes (i length)
(cl:unless (pb:is-initialized (cl:aref x i))
(cl:return-from pb:is-initialized cl:nil))))
cl:t)
(cl:defmethod pb:octet-size ((self query))
(cl:let ((size 0))
;; optional .Query.QueryType type = 1;
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:incf size 1)
(cl:incf size (varint:length64 (cl:ldb (cl:byte 64 0) (cl:slot-value self 'type)))))
;; optional .Term query = 2;
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:let ((s (pb:octet-size (cl:slot-value self 'query))))
(cl:incf size (cl:+ 1 s (varint:length32 s)))))
;; optional int64 token = 3;
(cl:when (cl:logbitp 2 (cl:slot-value self '%has-bits%))
(cl:incf size
(cl:+ 1 (varint:length64 (cl:ldb (cl:byte 64 0) (cl:slot-value self 'token))))))
;; optional bool OBSOLETE_noreply = 4 [default = false];
(cl:when (cl:logbitp 3 (cl:slot-value self '%has-bits%))
(cl:incf size
(cl:+ 1 1)))
;; optional bool accepts_r_json = 5 [default = false];
(cl:when (cl:logbitp 4 (cl:slot-value self '%has-bits%))
(cl:incf size
(cl:+ 1 1)))
;; repeated .Query.AssocPair global_optargs = 6;
(cl:let* ((v (cl:slot-value self 'global-optargs))
(length (cl:length v)))
(cl:incf size (cl:* 1 length))
(cl:dotimes (i length)
(cl:let ((s (pb:octet-size (cl:aref v i))))
(cl:incf size (cl:+ s (varint:length32 s))))))
(cl:setf (cl:slot-value self 'pb::%cached-size%) size)
size))
(cl:defmethod pb:serialize ((self query) buffer index limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index index limit)
(cl:ignorable buffer limit))
;; optional .Query.QueryType type = 1;
(cl:when (cl:logbitp 0 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 8))
(cl:setf index
(varint:encode-uint64-carefully buffer index limit
(cl:ldb (cl:byte 64 0) (cl:slot-value self 'type)))))
;; optional .Term query = 2;
(cl:when (cl:logbitp 1 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 18))
(cl:setf index (varint:encode-uint32-carefully buffer index limit (cl:slot-value (cl:slot-value self 'query) 'pb::%cached-size%)))
(cl:setf index (pb:serialize (cl:slot-value self 'query) buffer index limit)))
;; optional int64 token = 3;
(cl:when (cl:logbitp 2 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 24))
(cl:setf index (varint:encode-uint64-carefully buffer index limit (cl:ldb (cl:byte 64 0) (cl:slot-value self 'token)))))
;; optional bool OBSOLETE_noreply = 4 [default = false];
(cl:when (cl:logbitp 3 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 32))
(cl:setf index (wire-format:write-boolean-carefully buffer index limit (cl:slot-value self 'obsolete-noreply))))
;; optional bool accepts_r_json = 5 [default = false];
(cl:when (cl:logbitp 4 (cl:slot-value self '%has-bits%))
(cl:setf index (varint:encode-uint32-carefully buffer index limit 40))
(cl:setf index (wire-format:write-boolean-carefully buffer index limit (cl:slot-value self 'accepts-r-json))))
;; repeated .Query.AssocPair global_optargs = 6;
(cl:let* ((v (cl:slot-value self 'global-optargs))
(length (cl:length v)))
(cl:loop for i from 0 below length do
(cl:setf index (varint:encode-uint32-carefully buffer index limit 50))
(cl:setf index (varint:encode-uint32-carefully buffer index limit (cl:slot-value (cl:aref v i) 'pb::%cached-size%)))
(cl:setf index (pb:serialize (cl:aref v i) buffer index limit))))
index)
(cl:defmethod pb:merge-from-array ((self query) buffer start limit)
(cl:declare (cl:type com.google.base:octet-vector buffer)
(cl:type com.google.base:vector-index start limit))
(cl:do ((index start index))
((cl:>= index limit) index)
(cl:declare (cl:type com.google.base:vector-index index))
(cl:multiple-value-bind (tag new-index)
(varint:parse-uint32-carefully buffer index limit)
(cl:setf index new-index)
(cl:case tag
;; optional .Query.QueryType type = 1;
((8)
(cl:multiple-value-bind (value new-index)
(varint:parse-int32-carefully buffer index limit)
;; XXXXX: when valid, set field, else add to unknown fields
(cl:setf (cl:slot-value self 'type) value)
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1)
(cl:setf index new-index)))
;; optional .Term query = 2;
((18)
(cl:multiple-value-bind (length new-index)
(varint:parse-uint31-carefully buffer index limit)
(cl:when (cl:> (cl:+ new-index length) limit)
(cl:error "buffer overflow"))
(cl:let ((message (cl:slot-value self 'query)))
(cl:when (cl:null message)
(cl:setf message (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'query) message)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(cl:setf index (pb:merge-from-array message buffer new-index (cl:+ new-index length)))
(cl:when (cl:not (cl:= index (cl:+ new-index length)))
(cl:error "buffer overflow")))))
;; optional int64 token = 3;
((24)
(cl:multiple-value-bind (value new-index)
(varint:parse-int64-carefully buffer index limit)
(cl:setf (cl:slot-value self 'token) value)
(cl:setf (cl:ldb (cl:byte 1 2) (cl:slot-value self '%has-bits%)) 1)
(cl:setf index new-index)))
;; optional bool OBSOLETE_noreply = 4 [default = false];
((32)
(cl:multiple-value-bind (value new-index)
(wire-format:read-boolean-carefully buffer index limit)
(cl:setf (cl:slot-value self 'obsolete-noreply) value)
(cl:setf (cl:ldb (cl:byte 1 3) (cl:slot-value self '%has-bits%)) 1)
(cl:setf index new-index)))
;; optional bool accepts_r_json = 5 [default = false];
((40)
(cl:multiple-value-bind (value new-index)
(wire-format:read-boolean-carefully buffer index limit)
(cl:setf (cl:slot-value self 'accepts-r-json) value)
(cl:setf (cl:ldb (cl:byte 1 4) (cl:slot-value self '%has-bits%)) 1)
(cl:setf index new-index)))
;; repeated .Query.AssocPair global_optargs = 6;
((50)
(cl:multiple-value-bind (length new-index)
(varint:parse-uint31-carefully buffer index limit)
(cl:when (cl:> (cl:+ new-index length) limit)
(cl:error "buffer overflow"))
(cl:let ((message (cl:make-instance 'cl-rethinkdb-proto::query-assoc-pair)))
(cl:setf index (pb:merge-from-array message buffer new-index (cl:+ new-index length)))
(cl:when (cl:not (cl:= index (cl:+ new-index length)))
(cl:error "buffer overflow"))
(cl:vector-push-extend message (cl:slot-value self 'global-optargs)))))
(cl:t
(cl:when (cl:= (cl:logand tag 7) 4)
(cl:return-from pb:merge-from-array index))
(cl:setf index (wire-format:skip-field buffer index limit tag)))))))
(cl:defmethod pb:merge-from-message ((self query) (from query))
(cl:let* ((v (cl:slot-value self 'global-optargs))
(vf (cl:slot-value from 'global-optargs))
(length (cl:length vf)))
(cl:loop for i from 0 below length do
(cl:vector-push-extend (cl:aref vf i) v)))
(cl:when (cl:logbitp 0 (cl:slot-value from '%has-bits%))
(cl:setf (cl:slot-value self 'type) (cl:slot-value from 'type))
(cl:setf (cl:ldb (cl:byte 1 0) (cl:slot-value self '%has-bits%)) 1))
(cl:when (cl:logbitp 1 (cl:slot-value from '%has-bits%))
(cl:let ((message (cl:slot-value self 'query)))
(cl:when (cl:null message)
(cl:setf message (cl:make-instance 'cl-rethinkdb-proto::term))
(cl:setf (cl:slot-value self 'query) message)
(cl:setf (cl:ldb (cl:byte 1 1) (cl:slot-value self '%has-bits%)) 1))
(pb:merge-from-message message (cl:slot-value from 'query))))
(cl:when (cl:logbitp 2 (cl:slot-value from '%has-bits%))
(cl:setf (cl:slot-value self 'token) (cl:slot-value from 'token))
(cl:setf (cl:ldb (cl:byte 1 2) (cl:slot-value self '%has-bits%)) 1))
(cl:when (cl:logbitp 3 (cl:slot-value from '%has-bits%))
(cl:setf (cl:slot-value self 'obsolete-noreply) (cl:slot-value from 'obsolete-noreply))
(cl:setf (cl:ldb (cl:byte 1 3) (cl:slot-value self '%has-bits%)) 1))
(cl:when (cl:logbitp 4 (cl:slot-value from '%has-bits%))
(cl:setf (cl:slot-value self 'accepts-r-json) (cl:slot-value from 'accepts-r-json))
(cl:setf (cl:ldb (cl:byte 1 4) (cl:slot-value self '%has-bits%)) 1))
)
(cl:defclass frame (pb:protocol-buffer)
(
(type
:accessor type