@rivetkit/engine-envoy-protocol 0.0.0-main.14140ce → 0.0.0-main.17f6330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +265 -2
- package/dist/index.js +828 -74
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -366,6 +366,565 @@ function writeKvResponseData(bc, x) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
+
function readSqlitePgno(bc) {
|
|
370
|
+
return bare.readU32(bc);
|
|
371
|
+
}
|
|
372
|
+
function writeSqlitePgno(bc, x) {
|
|
373
|
+
bare.writeU32(bc, x);
|
|
374
|
+
}
|
|
375
|
+
function readSqliteGeneration(bc) {
|
|
376
|
+
return bare.readU64(bc);
|
|
377
|
+
}
|
|
378
|
+
function writeSqliteGeneration(bc, x) {
|
|
379
|
+
bare.writeU64(bc, x);
|
|
380
|
+
}
|
|
381
|
+
function readSqlitePageBytes(bc) {
|
|
382
|
+
return bare.readData(bc);
|
|
383
|
+
}
|
|
384
|
+
function writeSqlitePageBytes(bc, x) {
|
|
385
|
+
bare.writeData(bc, x);
|
|
386
|
+
}
|
|
387
|
+
function readSqliteDirtyPage(bc) {
|
|
388
|
+
return {
|
|
389
|
+
pgno: readSqlitePgno(bc),
|
|
390
|
+
bytes: readSqlitePageBytes(bc)
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function writeSqliteDirtyPage(bc, x) {
|
|
394
|
+
writeSqlitePgno(bc, x.pgno);
|
|
395
|
+
writeSqlitePageBytes(bc, x.bytes);
|
|
396
|
+
}
|
|
397
|
+
function read5(bc) {
|
|
398
|
+
return bare.readBool(bc) ? readSqlitePageBytes(bc) : null;
|
|
399
|
+
}
|
|
400
|
+
function write5(bc, x) {
|
|
401
|
+
bare.writeBool(bc, x != null);
|
|
402
|
+
if (x != null) {
|
|
403
|
+
writeSqlitePageBytes(bc, x);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function readSqliteFetchedPage(bc) {
|
|
407
|
+
return {
|
|
408
|
+
pgno: readSqlitePgno(bc),
|
|
409
|
+
bytes: read5(bc)
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function writeSqliteFetchedPage(bc, x) {
|
|
413
|
+
writeSqlitePgno(bc, x.pgno);
|
|
414
|
+
write5(bc, x.bytes);
|
|
415
|
+
}
|
|
416
|
+
function read6(bc) {
|
|
417
|
+
const len = bare.readUintSafe(bc);
|
|
418
|
+
if (len === 0) {
|
|
419
|
+
return [];
|
|
420
|
+
}
|
|
421
|
+
const result = [readSqlitePgno(bc)];
|
|
422
|
+
for (let i = 1; i < len; i++) {
|
|
423
|
+
result[i] = readSqlitePgno(bc);
|
|
424
|
+
}
|
|
425
|
+
return result;
|
|
426
|
+
}
|
|
427
|
+
function write6(bc, x) {
|
|
428
|
+
bare.writeUintSafe(bc, x.length);
|
|
429
|
+
for (let i = 0; i < x.length; i++) {
|
|
430
|
+
writeSqlitePgno(bc, x[i]);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function readSqliteGetPagesRequest(bc) {
|
|
434
|
+
return {
|
|
435
|
+
actorId: readId(bc),
|
|
436
|
+
pgnos: read6(bc),
|
|
437
|
+
expectedGeneration: read2(bc),
|
|
438
|
+
expectedHeadTxid: read2(bc)
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function writeSqliteGetPagesRequest(bc, x) {
|
|
442
|
+
writeId(bc, x.actorId);
|
|
443
|
+
write6(bc, x.pgnos);
|
|
444
|
+
write2(bc, x.expectedGeneration);
|
|
445
|
+
write2(bc, x.expectedHeadTxid);
|
|
446
|
+
}
|
|
447
|
+
function read7(bc) {
|
|
448
|
+
const len = bare.readUintSafe(bc);
|
|
449
|
+
if (len === 0) {
|
|
450
|
+
return [];
|
|
451
|
+
}
|
|
452
|
+
const result = [readSqliteFetchedPage(bc)];
|
|
453
|
+
for (let i = 1; i < len; i++) {
|
|
454
|
+
result[i] = readSqliteFetchedPage(bc);
|
|
455
|
+
}
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
function write7(bc, x) {
|
|
459
|
+
bare.writeUintSafe(bc, x.length);
|
|
460
|
+
for (let i = 0; i < x.length; i++) {
|
|
461
|
+
writeSqliteFetchedPage(bc, x[i]);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function readSqliteGetPagesOk(bc) {
|
|
465
|
+
return {
|
|
466
|
+
pages: read7(bc),
|
|
467
|
+
headTxid: read2(bc)
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
function writeSqliteGetPagesOk(bc, x) {
|
|
471
|
+
write7(bc, x.pages);
|
|
472
|
+
write2(bc, x.headTxid);
|
|
473
|
+
}
|
|
474
|
+
function readSqliteErrorResponse(bc) {
|
|
475
|
+
return {
|
|
476
|
+
group: bare.readString(bc),
|
|
477
|
+
code: bare.readString(bc),
|
|
478
|
+
message: bare.readString(bc)
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
function writeSqliteErrorResponse(bc, x) {
|
|
482
|
+
bare.writeString(bc, x.group);
|
|
483
|
+
bare.writeString(bc, x.code);
|
|
484
|
+
bare.writeString(bc, x.message);
|
|
485
|
+
}
|
|
486
|
+
function readSqliteGetPagesResponse(bc) {
|
|
487
|
+
const offset = bc.offset;
|
|
488
|
+
const tag = bare.readU8(bc);
|
|
489
|
+
switch (tag) {
|
|
490
|
+
case 0:
|
|
491
|
+
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
492
|
+
case 1:
|
|
493
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
494
|
+
default: {
|
|
495
|
+
bc.offset = offset;
|
|
496
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
function writeSqliteGetPagesResponse(bc, x) {
|
|
501
|
+
switch (x.tag) {
|
|
502
|
+
case "SqliteGetPagesOk": {
|
|
503
|
+
bare.writeU8(bc, 0);
|
|
504
|
+
writeSqliteGetPagesOk(bc, x.val);
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
case "SqliteErrorResponse": {
|
|
508
|
+
bare.writeU8(bc, 1);
|
|
509
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
function read8(bc) {
|
|
515
|
+
const len = bare.readUintSafe(bc);
|
|
516
|
+
if (len === 0) {
|
|
517
|
+
return [];
|
|
518
|
+
}
|
|
519
|
+
const result = [readSqliteDirtyPage(bc)];
|
|
520
|
+
for (let i = 1; i < len; i++) {
|
|
521
|
+
result[i] = readSqliteDirtyPage(bc);
|
|
522
|
+
}
|
|
523
|
+
return result;
|
|
524
|
+
}
|
|
525
|
+
function write8(bc, x) {
|
|
526
|
+
bare.writeUintSafe(bc, x.length);
|
|
527
|
+
for (let i = 0; i < x.length; i++) {
|
|
528
|
+
writeSqliteDirtyPage(bc, x[i]);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function readSqliteCommitRequest(bc) {
|
|
532
|
+
return {
|
|
533
|
+
actorId: readId(bc),
|
|
534
|
+
dirtyPages: read8(bc),
|
|
535
|
+
dbSizePages: bare.readU32(bc),
|
|
536
|
+
nowMs: bare.readI64(bc),
|
|
537
|
+
expectedGeneration: read2(bc),
|
|
538
|
+
expectedHeadTxid: read2(bc)
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function writeSqliteCommitRequest(bc, x) {
|
|
542
|
+
writeId(bc, x.actorId);
|
|
543
|
+
write8(bc, x.dirtyPages);
|
|
544
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
545
|
+
bare.writeI64(bc, x.nowMs);
|
|
546
|
+
write2(bc, x.expectedGeneration);
|
|
547
|
+
write2(bc, x.expectedHeadTxid);
|
|
548
|
+
}
|
|
549
|
+
function readSqliteCommitOk(bc) {
|
|
550
|
+
return {
|
|
551
|
+
headTxid: read2(bc)
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function writeSqliteCommitOk(bc, x) {
|
|
555
|
+
write2(bc, x.headTxid);
|
|
556
|
+
}
|
|
557
|
+
function readSqliteCommitResponse(bc) {
|
|
558
|
+
const offset = bc.offset;
|
|
559
|
+
const tag = bare.readU8(bc);
|
|
560
|
+
switch (tag) {
|
|
561
|
+
case 0:
|
|
562
|
+
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
563
|
+
case 1:
|
|
564
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
565
|
+
default: {
|
|
566
|
+
bc.offset = offset;
|
|
567
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function writeSqliteCommitResponse(bc, x) {
|
|
572
|
+
switch (x.tag) {
|
|
573
|
+
case "SqliteCommitOk": {
|
|
574
|
+
bare.writeU8(bc, 0);
|
|
575
|
+
writeSqliteCommitOk(bc, x.val);
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
case "SqliteErrorResponse": {
|
|
579
|
+
bare.writeU8(bc, 1);
|
|
580
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
function readSqliteValueInteger(bc) {
|
|
586
|
+
return {
|
|
587
|
+
value: bare.readI64(bc)
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
function writeSqliteValueInteger(bc, x) {
|
|
591
|
+
bare.writeI64(bc, x.value);
|
|
592
|
+
}
|
|
593
|
+
function readSqliteValueFloat(bc) {
|
|
594
|
+
return {
|
|
595
|
+
value: bare.readFixedData(bc, 8)
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function writeSqliteValueFloat(bc, x) {
|
|
599
|
+
{
|
|
600
|
+
assert(x.value.byteLength === 8);
|
|
601
|
+
bare.writeFixedData(bc, x.value);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function readSqliteValueText(bc) {
|
|
605
|
+
return {
|
|
606
|
+
value: bare.readString(bc)
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
function writeSqliteValueText(bc, x) {
|
|
610
|
+
bare.writeString(bc, x.value);
|
|
611
|
+
}
|
|
612
|
+
function readSqliteValueBlob(bc) {
|
|
613
|
+
return {
|
|
614
|
+
value: bare.readData(bc)
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function writeSqliteValueBlob(bc, x) {
|
|
618
|
+
bare.writeData(bc, x.value);
|
|
619
|
+
}
|
|
620
|
+
function readSqliteBindParam(bc) {
|
|
621
|
+
const offset = bc.offset;
|
|
622
|
+
const tag = bare.readU8(bc);
|
|
623
|
+
switch (tag) {
|
|
624
|
+
case 0:
|
|
625
|
+
return { tag: "SqliteValueNull", val: null };
|
|
626
|
+
case 1:
|
|
627
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
628
|
+
case 2:
|
|
629
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
630
|
+
case 3:
|
|
631
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
632
|
+
case 4:
|
|
633
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
634
|
+
default: {
|
|
635
|
+
bc.offset = offset;
|
|
636
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
function writeSqliteBindParam(bc, x) {
|
|
641
|
+
switch (x.tag) {
|
|
642
|
+
case "SqliteValueNull": {
|
|
643
|
+
bare.writeU8(bc, 0);
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
case "SqliteValueInteger": {
|
|
647
|
+
bare.writeU8(bc, 1);
|
|
648
|
+
writeSqliteValueInteger(bc, x.val);
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
case "SqliteValueFloat": {
|
|
652
|
+
bare.writeU8(bc, 2);
|
|
653
|
+
writeSqliteValueFloat(bc, x.val);
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
case "SqliteValueText": {
|
|
657
|
+
bare.writeU8(bc, 3);
|
|
658
|
+
writeSqliteValueText(bc, x.val);
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
case "SqliteValueBlob": {
|
|
662
|
+
bare.writeU8(bc, 4);
|
|
663
|
+
writeSqliteValueBlob(bc, x.val);
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
function readSqliteColumnValue(bc) {
|
|
669
|
+
const offset = bc.offset;
|
|
670
|
+
const tag = bare.readU8(bc);
|
|
671
|
+
switch (tag) {
|
|
672
|
+
case 0:
|
|
673
|
+
return { tag: "SqliteValueNull", val: null };
|
|
674
|
+
case 1:
|
|
675
|
+
return { tag: "SqliteValueInteger", val: readSqliteValueInteger(bc) };
|
|
676
|
+
case 2:
|
|
677
|
+
return { tag: "SqliteValueFloat", val: readSqliteValueFloat(bc) };
|
|
678
|
+
case 3:
|
|
679
|
+
return { tag: "SqliteValueText", val: readSqliteValueText(bc) };
|
|
680
|
+
case 4:
|
|
681
|
+
return { tag: "SqliteValueBlob", val: readSqliteValueBlob(bc) };
|
|
682
|
+
default: {
|
|
683
|
+
bc.offset = offset;
|
|
684
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function writeSqliteColumnValue(bc, x) {
|
|
689
|
+
switch (x.tag) {
|
|
690
|
+
case "SqliteValueNull": {
|
|
691
|
+
bare.writeU8(bc, 0);
|
|
692
|
+
break;
|
|
693
|
+
}
|
|
694
|
+
case "SqliteValueInteger": {
|
|
695
|
+
bare.writeU8(bc, 1);
|
|
696
|
+
writeSqliteValueInteger(bc, x.val);
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
case "SqliteValueFloat": {
|
|
700
|
+
bare.writeU8(bc, 2);
|
|
701
|
+
writeSqliteValueFloat(bc, x.val);
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
case "SqliteValueText": {
|
|
705
|
+
bare.writeU8(bc, 3);
|
|
706
|
+
writeSqliteValueText(bc, x.val);
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
case "SqliteValueBlob": {
|
|
710
|
+
bare.writeU8(bc, 4);
|
|
711
|
+
writeSqliteValueBlob(bc, x.val);
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
function read9(bc) {
|
|
717
|
+
const len = bare.readUintSafe(bc);
|
|
718
|
+
if (len === 0) {
|
|
719
|
+
return [];
|
|
720
|
+
}
|
|
721
|
+
const result = [bare.readString(bc)];
|
|
722
|
+
for (let i = 1; i < len; i++) {
|
|
723
|
+
result[i] = bare.readString(bc);
|
|
724
|
+
}
|
|
725
|
+
return result;
|
|
726
|
+
}
|
|
727
|
+
function write9(bc, x) {
|
|
728
|
+
bare.writeUintSafe(bc, x.length);
|
|
729
|
+
for (let i = 0; i < x.length; i++) {
|
|
730
|
+
bare.writeString(bc, x[i]);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
function read10(bc) {
|
|
734
|
+
const len = bare.readUintSafe(bc);
|
|
735
|
+
if (len === 0) {
|
|
736
|
+
return [];
|
|
737
|
+
}
|
|
738
|
+
const result = [readSqliteColumnValue(bc)];
|
|
739
|
+
for (let i = 1; i < len; i++) {
|
|
740
|
+
result[i] = readSqliteColumnValue(bc);
|
|
741
|
+
}
|
|
742
|
+
return result;
|
|
743
|
+
}
|
|
744
|
+
function write10(bc, x) {
|
|
745
|
+
bare.writeUintSafe(bc, x.length);
|
|
746
|
+
for (let i = 0; i < x.length; i++) {
|
|
747
|
+
writeSqliteColumnValue(bc, x[i]);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function read11(bc) {
|
|
751
|
+
const len = bare.readUintSafe(bc);
|
|
752
|
+
if (len === 0) {
|
|
753
|
+
return [];
|
|
754
|
+
}
|
|
755
|
+
const result = [read10(bc)];
|
|
756
|
+
for (let i = 1; i < len; i++) {
|
|
757
|
+
result[i] = read10(bc);
|
|
758
|
+
}
|
|
759
|
+
return result;
|
|
760
|
+
}
|
|
761
|
+
function write11(bc, x) {
|
|
762
|
+
bare.writeUintSafe(bc, x.length);
|
|
763
|
+
for (let i = 0; i < x.length; i++) {
|
|
764
|
+
write10(bc, x[i]);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
function readSqliteQueryResult(bc) {
|
|
768
|
+
return {
|
|
769
|
+
columns: read9(bc),
|
|
770
|
+
rows: read11(bc)
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
function writeSqliteQueryResult(bc, x) {
|
|
774
|
+
write9(bc, x.columns);
|
|
775
|
+
write11(bc, x.rows);
|
|
776
|
+
}
|
|
777
|
+
function read12(bc) {
|
|
778
|
+
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
779
|
+
}
|
|
780
|
+
function write12(bc, x) {
|
|
781
|
+
bare.writeBool(bc, x != null);
|
|
782
|
+
if (x != null) {
|
|
783
|
+
bare.writeI64(bc, x);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
function readSqliteExecuteResult(bc) {
|
|
787
|
+
return {
|
|
788
|
+
columns: read9(bc),
|
|
789
|
+
rows: read11(bc),
|
|
790
|
+
changes: bare.readI64(bc),
|
|
791
|
+
lastInsertRowId: read12(bc)
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function writeSqliteExecuteResult(bc, x) {
|
|
795
|
+
write9(bc, x.columns);
|
|
796
|
+
write11(bc, x.rows);
|
|
797
|
+
bare.writeI64(bc, x.changes);
|
|
798
|
+
write12(bc, x.lastInsertRowId);
|
|
799
|
+
}
|
|
800
|
+
function readSqliteExecRequest(bc) {
|
|
801
|
+
return {
|
|
802
|
+
namespaceId: readId(bc),
|
|
803
|
+
actorId: readId(bc),
|
|
804
|
+
generation: readSqliteGeneration(bc),
|
|
805
|
+
sql: bare.readString(bc)
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
function writeSqliteExecRequest(bc, x) {
|
|
809
|
+
writeId(bc, x.namespaceId);
|
|
810
|
+
writeId(bc, x.actorId);
|
|
811
|
+
writeSqliteGeneration(bc, x.generation);
|
|
812
|
+
bare.writeString(bc, x.sql);
|
|
813
|
+
}
|
|
814
|
+
function read13(bc) {
|
|
815
|
+
const len = bare.readUintSafe(bc);
|
|
816
|
+
if (len === 0) {
|
|
817
|
+
return [];
|
|
818
|
+
}
|
|
819
|
+
const result = [readSqliteBindParam(bc)];
|
|
820
|
+
for (let i = 1; i < len; i++) {
|
|
821
|
+
result[i] = readSqliteBindParam(bc);
|
|
822
|
+
}
|
|
823
|
+
return result;
|
|
824
|
+
}
|
|
825
|
+
function write13(bc, x) {
|
|
826
|
+
bare.writeUintSafe(bc, x.length);
|
|
827
|
+
for (let i = 0; i < x.length; i++) {
|
|
828
|
+
writeSqliteBindParam(bc, x[i]);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
function read14(bc) {
|
|
832
|
+
return bare.readBool(bc) ? read13(bc) : null;
|
|
833
|
+
}
|
|
834
|
+
function write14(bc, x) {
|
|
835
|
+
bare.writeBool(bc, x != null);
|
|
836
|
+
if (x != null) {
|
|
837
|
+
write13(bc, x);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
function readSqliteExecuteRequest(bc) {
|
|
841
|
+
return {
|
|
842
|
+
namespaceId: readId(bc),
|
|
843
|
+
actorId: readId(bc),
|
|
844
|
+
generation: readSqliteGeneration(bc),
|
|
845
|
+
sql: bare.readString(bc),
|
|
846
|
+
params: read14(bc)
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function writeSqliteExecuteRequest(bc, x) {
|
|
850
|
+
writeId(bc, x.namespaceId);
|
|
851
|
+
writeId(bc, x.actorId);
|
|
852
|
+
writeSqliteGeneration(bc, x.generation);
|
|
853
|
+
bare.writeString(bc, x.sql);
|
|
854
|
+
write14(bc, x.params);
|
|
855
|
+
}
|
|
856
|
+
function readSqliteExecOk(bc) {
|
|
857
|
+
return {
|
|
858
|
+
result: readSqliteQueryResult(bc)
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
function writeSqliteExecOk(bc, x) {
|
|
862
|
+
writeSqliteQueryResult(bc, x.result);
|
|
863
|
+
}
|
|
864
|
+
function readSqliteExecuteOk(bc) {
|
|
865
|
+
return {
|
|
866
|
+
result: readSqliteExecuteResult(bc)
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
function writeSqliteExecuteOk(bc, x) {
|
|
870
|
+
writeSqliteExecuteResult(bc, x.result);
|
|
871
|
+
}
|
|
872
|
+
function readSqliteExecResponse(bc) {
|
|
873
|
+
const offset = bc.offset;
|
|
874
|
+
const tag = bare.readU8(bc);
|
|
875
|
+
switch (tag) {
|
|
876
|
+
case 0:
|
|
877
|
+
return { tag: "SqliteExecOk", val: readSqliteExecOk(bc) };
|
|
878
|
+
case 1:
|
|
879
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
880
|
+
default: {
|
|
881
|
+
bc.offset = offset;
|
|
882
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
function writeSqliteExecResponse(bc, x) {
|
|
887
|
+
switch (x.tag) {
|
|
888
|
+
case "SqliteExecOk": {
|
|
889
|
+
bare.writeU8(bc, 0);
|
|
890
|
+
writeSqliteExecOk(bc, x.val);
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
case "SqliteErrorResponse": {
|
|
894
|
+
bare.writeU8(bc, 1);
|
|
895
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
function readSqliteExecuteResponse(bc) {
|
|
901
|
+
const offset = bc.offset;
|
|
902
|
+
const tag = bare.readU8(bc);
|
|
903
|
+
switch (tag) {
|
|
904
|
+
case 0:
|
|
905
|
+
return { tag: "SqliteExecuteOk", val: readSqliteExecuteOk(bc) };
|
|
906
|
+
case 1:
|
|
907
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
908
|
+
default: {
|
|
909
|
+
bc.offset = offset;
|
|
910
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function writeSqliteExecuteResponse(bc, x) {
|
|
915
|
+
switch (x.tag) {
|
|
916
|
+
case "SqliteExecuteOk": {
|
|
917
|
+
bare.writeU8(bc, 0);
|
|
918
|
+
writeSqliteExecuteOk(bc, x.val);
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
case "SqliteErrorResponse": {
|
|
922
|
+
bare.writeU8(bc, 1);
|
|
923
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
369
928
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
370
929
|
StopCode2["Ok"] = "Ok";
|
|
371
930
|
StopCode2["Error"] = "Error";
|
|
@@ -405,19 +964,19 @@ function readActorName(bc) {
|
|
|
405
964
|
function writeActorName(bc, x) {
|
|
406
965
|
writeJson(bc, x.metadata);
|
|
407
966
|
}
|
|
408
|
-
function
|
|
967
|
+
function read15(bc) {
|
|
409
968
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
410
969
|
}
|
|
411
|
-
function
|
|
970
|
+
function write15(bc, x) {
|
|
412
971
|
bare.writeBool(bc, x != null);
|
|
413
972
|
if (x != null) {
|
|
414
973
|
bare.writeString(bc, x);
|
|
415
974
|
}
|
|
416
975
|
}
|
|
417
|
-
function
|
|
976
|
+
function read16(bc) {
|
|
418
977
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
419
978
|
}
|
|
420
|
-
function
|
|
979
|
+
function write16(bc, x) {
|
|
421
980
|
bare.writeBool(bc, x != null);
|
|
422
981
|
if (x != null) {
|
|
423
982
|
bare.writeData(bc, x);
|
|
@@ -426,16 +985,16 @@ function write6(bc, x) {
|
|
|
426
985
|
function readActorConfig(bc) {
|
|
427
986
|
return {
|
|
428
987
|
name: bare.readString(bc),
|
|
429
|
-
key:
|
|
988
|
+
key: read15(bc),
|
|
430
989
|
createTs: bare.readI64(bc),
|
|
431
|
-
input:
|
|
990
|
+
input: read16(bc)
|
|
432
991
|
};
|
|
433
992
|
}
|
|
434
993
|
function writeActorConfig(bc, x) {
|
|
435
994
|
bare.writeString(bc, x.name);
|
|
436
|
-
|
|
995
|
+
write15(bc, x.key);
|
|
437
996
|
bare.writeI64(bc, x.createTs);
|
|
438
|
-
|
|
997
|
+
write16(bc, x.input);
|
|
439
998
|
}
|
|
440
999
|
function readActorCheckpoint(bc) {
|
|
441
1000
|
return {
|
|
@@ -478,12 +1037,12 @@ function writeActorIntent(bc, x) {
|
|
|
478
1037
|
function readActorStateStopped(bc) {
|
|
479
1038
|
return {
|
|
480
1039
|
code: readStopCode(bc),
|
|
481
|
-
message:
|
|
1040
|
+
message: read15(bc)
|
|
482
1041
|
};
|
|
483
1042
|
}
|
|
484
1043
|
function writeActorStateStopped(bc, x) {
|
|
485
1044
|
writeStopCode(bc, x.code);
|
|
486
|
-
|
|
1045
|
+
write15(bc, x.message);
|
|
487
1046
|
}
|
|
488
1047
|
function readActorState(bc) {
|
|
489
1048
|
const offset = bc.offset;
|
|
@@ -528,22 +1087,13 @@ function readEventActorStateUpdate(bc) {
|
|
|
528
1087
|
function writeEventActorStateUpdate(bc, x) {
|
|
529
1088
|
writeActorState(bc, x.state);
|
|
530
1089
|
}
|
|
531
|
-
function read7(bc) {
|
|
532
|
-
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
533
|
-
}
|
|
534
|
-
function write7(bc, x) {
|
|
535
|
-
bare.writeBool(bc, x != null);
|
|
536
|
-
if (x != null) {
|
|
537
|
-
bare.writeI64(bc, x);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
1090
|
function readEventActorSetAlarm(bc) {
|
|
541
1091
|
return {
|
|
542
|
-
alarmTs:
|
|
1092
|
+
alarmTs: read12(bc)
|
|
543
1093
|
};
|
|
544
1094
|
}
|
|
545
1095
|
function writeEventActorSetAlarm(bc, x) {
|
|
546
|
-
|
|
1096
|
+
write12(bc, x.alarmTs);
|
|
547
1097
|
}
|
|
548
1098
|
function readEvent(bc) {
|
|
549
1099
|
const offset = bc.offset;
|
|
@@ -602,7 +1152,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
602
1152
|
writeKvValue(bc, x.value);
|
|
603
1153
|
writeKvMetadata(bc, x.metadata);
|
|
604
1154
|
}
|
|
605
|
-
function
|
|
1155
|
+
function read17(bc) {
|
|
606
1156
|
const len = bare.readUintSafe(bc);
|
|
607
1157
|
if (len === 0) {
|
|
608
1158
|
return [];
|
|
@@ -613,7 +1163,7 @@ function read8(bc) {
|
|
|
613
1163
|
}
|
|
614
1164
|
return result;
|
|
615
1165
|
}
|
|
616
|
-
function
|
|
1166
|
+
function write17(bc, x) {
|
|
617
1167
|
bare.writeUintSafe(bc, x.length);
|
|
618
1168
|
for (let i = 0; i < x.length; i++) {
|
|
619
1169
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -621,13 +1171,13 @@ function write8(bc, x) {
|
|
|
621
1171
|
}
|
|
622
1172
|
function readPreloadedKv(bc) {
|
|
623
1173
|
return {
|
|
624
|
-
entries:
|
|
1174
|
+
entries: read17(bc),
|
|
625
1175
|
requestedGetKeys: read0(bc),
|
|
626
1176
|
requestedPrefixes: read0(bc)
|
|
627
1177
|
};
|
|
628
1178
|
}
|
|
629
1179
|
function writePreloadedKv(bc, x) {
|
|
630
|
-
|
|
1180
|
+
write17(bc, x.entries);
|
|
631
1181
|
write0(bc, x.requestedGetKeys);
|
|
632
1182
|
write0(bc, x.requestedPrefixes);
|
|
633
1183
|
}
|
|
@@ -641,7 +1191,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
641
1191
|
writeGatewayId(bc, x.gatewayId);
|
|
642
1192
|
writeRequestId(bc, x.requestId);
|
|
643
1193
|
}
|
|
644
|
-
function
|
|
1194
|
+
function read18(bc) {
|
|
645
1195
|
const len = bare.readUintSafe(bc);
|
|
646
1196
|
if (len === 0) {
|
|
647
1197
|
return [];
|
|
@@ -652,16 +1202,16 @@ function read9(bc) {
|
|
|
652
1202
|
}
|
|
653
1203
|
return result;
|
|
654
1204
|
}
|
|
655
|
-
function
|
|
1205
|
+
function write18(bc, x) {
|
|
656
1206
|
bare.writeUintSafe(bc, x.length);
|
|
657
1207
|
for (let i = 0; i < x.length; i++) {
|
|
658
1208
|
writeHibernatingRequest(bc, x[i]);
|
|
659
1209
|
}
|
|
660
1210
|
}
|
|
661
|
-
function
|
|
1211
|
+
function read19(bc) {
|
|
662
1212
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
663
1213
|
}
|
|
664
|
-
function
|
|
1214
|
+
function write19(bc, x) {
|
|
665
1215
|
bare.writeBool(bc, x != null);
|
|
666
1216
|
if (x != null) {
|
|
667
1217
|
writePreloadedKv(bc, x);
|
|
@@ -670,14 +1220,14 @@ function write10(bc, x) {
|
|
|
670
1220
|
function readCommandStartActor(bc) {
|
|
671
1221
|
return {
|
|
672
1222
|
config: readActorConfig(bc),
|
|
673
|
-
hibernatingRequests:
|
|
674
|
-
preloadedKv:
|
|
1223
|
+
hibernatingRequests: read18(bc),
|
|
1224
|
+
preloadedKv: read19(bc)
|
|
675
1225
|
};
|
|
676
1226
|
}
|
|
677
1227
|
function writeCommandStartActor(bc, x) {
|
|
678
1228
|
writeActorConfig(bc, x.config);
|
|
679
|
-
|
|
680
|
-
|
|
1229
|
+
write18(bc, x.hibernatingRequests);
|
|
1230
|
+
write19(bc, x.preloadedKv);
|
|
681
1231
|
}
|
|
682
1232
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
683
1233
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -834,7 +1384,7 @@ function writeMessageId(bc, x) {
|
|
|
834
1384
|
writeRequestId(bc, x.requestId);
|
|
835
1385
|
writeMessageIndex(bc, x.messageIndex);
|
|
836
1386
|
}
|
|
837
|
-
function
|
|
1387
|
+
function read20(bc) {
|
|
838
1388
|
const len = bare.readUintSafe(bc);
|
|
839
1389
|
const result = /* @__PURE__ */ new Map();
|
|
840
1390
|
for (let i = 0; i < len; i++) {
|
|
@@ -848,7 +1398,7 @@ function read11(bc) {
|
|
|
848
1398
|
}
|
|
849
1399
|
return result;
|
|
850
1400
|
}
|
|
851
|
-
function
|
|
1401
|
+
function write20(bc, x) {
|
|
852
1402
|
bare.writeUintSafe(bc, x.size);
|
|
853
1403
|
for (const kv of x) {
|
|
854
1404
|
bare.writeString(bc, kv[0]);
|
|
@@ -860,8 +1410,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
860
1410
|
actorId: readId(bc),
|
|
861
1411
|
method: bare.readString(bc),
|
|
862
1412
|
path: bare.readString(bc),
|
|
863
|
-
headers:
|
|
864
|
-
body:
|
|
1413
|
+
headers: read20(bc),
|
|
1414
|
+
body: read16(bc),
|
|
865
1415
|
stream: bare.readBool(bc)
|
|
866
1416
|
};
|
|
867
1417
|
}
|
|
@@ -869,8 +1419,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
869
1419
|
writeId(bc, x.actorId);
|
|
870
1420
|
bare.writeString(bc, x.method);
|
|
871
1421
|
bare.writeString(bc, x.path);
|
|
872
|
-
|
|
873
|
-
|
|
1422
|
+
write20(bc, x.headers);
|
|
1423
|
+
write16(bc, x.body);
|
|
874
1424
|
bare.writeBool(bc, x.stream);
|
|
875
1425
|
}
|
|
876
1426
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -886,15 +1436,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
886
1436
|
function readToRivetResponseStart(bc) {
|
|
887
1437
|
return {
|
|
888
1438
|
status: bare.readU16(bc),
|
|
889
|
-
headers:
|
|
890
|
-
body:
|
|
1439
|
+
headers: read20(bc),
|
|
1440
|
+
body: read16(bc),
|
|
891
1441
|
stream: bare.readBool(bc)
|
|
892
1442
|
};
|
|
893
1443
|
}
|
|
894
1444
|
function writeToRivetResponseStart(bc, x) {
|
|
895
1445
|
bare.writeU16(bc, x.status);
|
|
896
|
-
|
|
897
|
-
|
|
1446
|
+
write20(bc, x.headers);
|
|
1447
|
+
write16(bc, x.body);
|
|
898
1448
|
bare.writeBool(bc, x.stream);
|
|
899
1449
|
}
|
|
900
1450
|
function readToRivetResponseChunk(bc) {
|
|
@@ -911,13 +1461,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
911
1461
|
return {
|
|
912
1462
|
actorId: readId(bc),
|
|
913
1463
|
path: bare.readString(bc),
|
|
914
|
-
headers:
|
|
1464
|
+
headers: read20(bc)
|
|
915
1465
|
};
|
|
916
1466
|
}
|
|
917
1467
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
918
1468
|
writeId(bc, x.actorId);
|
|
919
1469
|
bare.writeString(bc, x.path);
|
|
920
|
-
|
|
1470
|
+
write20(bc, x.headers);
|
|
921
1471
|
}
|
|
922
1472
|
function readToEnvoyWebSocketMessage(bc) {
|
|
923
1473
|
return {
|
|
@@ -929,10 +1479,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
929
1479
|
bare.writeData(bc, x.data);
|
|
930
1480
|
bare.writeBool(bc, x.binary);
|
|
931
1481
|
}
|
|
932
|
-
function
|
|
1482
|
+
function read21(bc) {
|
|
933
1483
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
934
1484
|
}
|
|
935
|
-
function
|
|
1485
|
+
function write21(bc, x) {
|
|
936
1486
|
bare.writeBool(bc, x != null);
|
|
937
1487
|
if (x != null) {
|
|
938
1488
|
bare.writeU16(bc, x);
|
|
@@ -940,13 +1490,13 @@ function write12(bc, x) {
|
|
|
940
1490
|
}
|
|
941
1491
|
function readToEnvoyWebSocketClose(bc) {
|
|
942
1492
|
return {
|
|
943
|
-
code:
|
|
944
|
-
reason:
|
|
1493
|
+
code: read21(bc),
|
|
1494
|
+
reason: read15(bc)
|
|
945
1495
|
};
|
|
946
1496
|
}
|
|
947
1497
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
948
|
-
|
|
949
|
-
|
|
1498
|
+
write21(bc, x.code);
|
|
1499
|
+
write15(bc, x.reason);
|
|
950
1500
|
}
|
|
951
1501
|
function readToRivetWebSocketOpen(bc) {
|
|
952
1502
|
return {
|
|
@@ -976,14 +1526,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
976
1526
|
}
|
|
977
1527
|
function readToRivetWebSocketClose(bc) {
|
|
978
1528
|
return {
|
|
979
|
-
code:
|
|
980
|
-
reason:
|
|
1529
|
+
code: read21(bc),
|
|
1530
|
+
reason: read15(bc),
|
|
981
1531
|
hibernate: bare.readBool(bc)
|
|
982
1532
|
};
|
|
983
1533
|
}
|
|
984
1534
|
function writeToRivetWebSocketClose(bc, x) {
|
|
985
|
-
|
|
986
|
-
|
|
1535
|
+
write21(bc, x.code);
|
|
1536
|
+
write15(bc, x.reason);
|
|
987
1537
|
bare.writeBool(bc, x.hibernate);
|
|
988
1538
|
}
|
|
989
1539
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1131,7 +1681,7 @@ function readToEnvoyPing(bc) {
|
|
|
1131
1681
|
function writeToEnvoyPing(bc, x) {
|
|
1132
1682
|
bare.writeI64(bc, x.ts);
|
|
1133
1683
|
}
|
|
1134
|
-
function
|
|
1684
|
+
function read22(bc) {
|
|
1135
1685
|
const len = bare.readUintSafe(bc);
|
|
1136
1686
|
const result = /* @__PURE__ */ new Map();
|
|
1137
1687
|
for (let i = 0; i < len; i++) {
|
|
@@ -1145,26 +1695,26 @@ function read13(bc) {
|
|
|
1145
1695
|
}
|
|
1146
1696
|
return result;
|
|
1147
1697
|
}
|
|
1148
|
-
function
|
|
1698
|
+
function write22(bc, x) {
|
|
1149
1699
|
bare.writeUintSafe(bc, x.size);
|
|
1150
1700
|
for (const kv of x) {
|
|
1151
1701
|
bare.writeString(bc, kv[0]);
|
|
1152
1702
|
writeActorName(bc, kv[1]);
|
|
1153
1703
|
}
|
|
1154
1704
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return bare.readBool(bc) ?
|
|
1705
|
+
function read23(bc) {
|
|
1706
|
+
return bare.readBool(bc) ? read22(bc) : null;
|
|
1157
1707
|
}
|
|
1158
|
-
function
|
|
1708
|
+
function write23(bc, x) {
|
|
1159
1709
|
bare.writeBool(bc, x != null);
|
|
1160
1710
|
if (x != null) {
|
|
1161
|
-
|
|
1711
|
+
write22(bc, x);
|
|
1162
1712
|
}
|
|
1163
1713
|
}
|
|
1164
|
-
function
|
|
1714
|
+
function read24(bc) {
|
|
1165
1715
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1166
1716
|
}
|
|
1167
|
-
function
|
|
1717
|
+
function write24(bc, x) {
|
|
1168
1718
|
bare.writeBool(bc, x != null);
|
|
1169
1719
|
if (x != null) {
|
|
1170
1720
|
writeJson(bc, x);
|
|
@@ -1172,13 +1722,13 @@ function write15(bc, x) {
|
|
|
1172
1722
|
}
|
|
1173
1723
|
function readToRivetMetadata(bc) {
|
|
1174
1724
|
return {
|
|
1175
|
-
prepopulateActorNames:
|
|
1176
|
-
metadata:
|
|
1725
|
+
prepopulateActorNames: read23(bc),
|
|
1726
|
+
metadata: read24(bc)
|
|
1177
1727
|
};
|
|
1178
1728
|
}
|
|
1179
1729
|
function writeToRivetMetadata(bc, x) {
|
|
1180
|
-
|
|
1181
|
-
|
|
1730
|
+
write23(bc, x.prepopulateActorNames);
|
|
1731
|
+
write24(bc, x.metadata);
|
|
1182
1732
|
}
|
|
1183
1733
|
function readToRivetEvents(bc) {
|
|
1184
1734
|
const len = bare.readUintSafe(bc);
|
|
@@ -1197,7 +1747,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1197
1747
|
writeEventWrapper(bc, x[i]);
|
|
1198
1748
|
}
|
|
1199
1749
|
}
|
|
1200
|
-
function
|
|
1750
|
+
function read25(bc) {
|
|
1201
1751
|
const len = bare.readUintSafe(bc);
|
|
1202
1752
|
if (len === 0) {
|
|
1203
1753
|
return [];
|
|
@@ -1208,7 +1758,7 @@ function read16(bc) {
|
|
|
1208
1758
|
}
|
|
1209
1759
|
return result;
|
|
1210
1760
|
}
|
|
1211
|
-
function
|
|
1761
|
+
function write25(bc, x) {
|
|
1212
1762
|
bare.writeUintSafe(bc, x.length);
|
|
1213
1763
|
for (let i = 0; i < x.length; i++) {
|
|
1214
1764
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1216,11 +1766,11 @@ function write16(bc, x) {
|
|
|
1216
1766
|
}
|
|
1217
1767
|
function readToRivetAckCommands(bc) {
|
|
1218
1768
|
return {
|
|
1219
|
-
lastCommandCheckpoints:
|
|
1769
|
+
lastCommandCheckpoints: read25(bc)
|
|
1220
1770
|
};
|
|
1221
1771
|
}
|
|
1222
1772
|
function writeToRivetAckCommands(bc, x) {
|
|
1223
|
-
|
|
1773
|
+
write25(bc, x.lastCommandCheckpoints);
|
|
1224
1774
|
}
|
|
1225
1775
|
function readToRivetPong(bc) {
|
|
1226
1776
|
return {
|
|
@@ -1242,6 +1792,46 @@ function writeToRivetKvRequest(bc, x) {
|
|
|
1242
1792
|
bare.writeU32(bc, x.requestId);
|
|
1243
1793
|
writeKvRequestData(bc, x.data);
|
|
1244
1794
|
}
|
|
1795
|
+
function readToRivetSqliteGetPagesRequest(bc) {
|
|
1796
|
+
return {
|
|
1797
|
+
requestId: bare.readU32(bc),
|
|
1798
|
+
data: readSqliteGetPagesRequest(bc)
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
function writeToRivetSqliteGetPagesRequest(bc, x) {
|
|
1802
|
+
bare.writeU32(bc, x.requestId);
|
|
1803
|
+
writeSqliteGetPagesRequest(bc, x.data);
|
|
1804
|
+
}
|
|
1805
|
+
function readToRivetSqliteCommitRequest(bc) {
|
|
1806
|
+
return {
|
|
1807
|
+
requestId: bare.readU32(bc),
|
|
1808
|
+
data: readSqliteCommitRequest(bc)
|
|
1809
|
+
};
|
|
1810
|
+
}
|
|
1811
|
+
function writeToRivetSqliteCommitRequest(bc, x) {
|
|
1812
|
+
bare.writeU32(bc, x.requestId);
|
|
1813
|
+
writeSqliteCommitRequest(bc, x.data);
|
|
1814
|
+
}
|
|
1815
|
+
function readToRivetSqliteExecRequest(bc) {
|
|
1816
|
+
return {
|
|
1817
|
+
requestId: bare.readU32(bc),
|
|
1818
|
+
data: readSqliteExecRequest(bc)
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
function writeToRivetSqliteExecRequest(bc, x) {
|
|
1822
|
+
bare.writeU32(bc, x.requestId);
|
|
1823
|
+
writeSqliteExecRequest(bc, x.data);
|
|
1824
|
+
}
|
|
1825
|
+
function readToRivetSqliteExecuteRequest(bc) {
|
|
1826
|
+
return {
|
|
1827
|
+
requestId: bare.readU32(bc),
|
|
1828
|
+
data: readSqliteExecuteRequest(bc)
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
function writeToRivetSqliteExecuteRequest(bc, x) {
|
|
1832
|
+
bare.writeU32(bc, x.requestId);
|
|
1833
|
+
writeSqliteExecuteRequest(bc, x.data);
|
|
1834
|
+
}
|
|
1245
1835
|
function readToRivet(bc) {
|
|
1246
1836
|
const offset = bc.offset;
|
|
1247
1837
|
const tag = bare.readU8(bc);
|
|
@@ -1260,6 +1850,14 @@ function readToRivet(bc) {
|
|
|
1260
1850
|
return { tag: "ToRivetKvRequest", val: readToRivetKvRequest(bc) };
|
|
1261
1851
|
case 6:
|
|
1262
1852
|
return { tag: "ToRivetTunnelMessage", val: readToRivetTunnelMessage(bc) };
|
|
1853
|
+
case 7:
|
|
1854
|
+
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1855
|
+
case 8:
|
|
1856
|
+
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1857
|
+
case 9:
|
|
1858
|
+
return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
|
|
1859
|
+
case 10:
|
|
1860
|
+
return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
|
|
1263
1861
|
default: {
|
|
1264
1862
|
bc.offset = offset;
|
|
1265
1863
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1302,6 +1900,26 @@ function writeToRivet(bc, x) {
|
|
|
1302
1900
|
writeToRivetTunnelMessage(bc, x.val);
|
|
1303
1901
|
break;
|
|
1304
1902
|
}
|
|
1903
|
+
case "ToRivetSqliteGetPagesRequest": {
|
|
1904
|
+
bare.writeU8(bc, 7);
|
|
1905
|
+
writeToRivetSqliteGetPagesRequest(bc, x.val);
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1908
|
+
case "ToRivetSqliteCommitRequest": {
|
|
1909
|
+
bare.writeU8(bc, 8);
|
|
1910
|
+
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1911
|
+
break;
|
|
1912
|
+
}
|
|
1913
|
+
case "ToRivetSqliteExecRequest": {
|
|
1914
|
+
bare.writeU8(bc, 9);
|
|
1915
|
+
writeToRivetSqliteExecRequest(bc, x.val);
|
|
1916
|
+
break;
|
|
1917
|
+
}
|
|
1918
|
+
case "ToRivetSqliteExecuteRequest": {
|
|
1919
|
+
bare.writeU8(bc, 10);
|
|
1920
|
+
writeToRivetSqliteExecuteRequest(bc, x.val);
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
1305
1923
|
}
|
|
1306
1924
|
}
|
|
1307
1925
|
function encodeToRivet(x, config) {
|
|
@@ -1360,11 +1978,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1360
1978
|
}
|
|
1361
1979
|
function readToEnvoyAckEvents(bc) {
|
|
1362
1980
|
return {
|
|
1363
|
-
lastEventCheckpoints:
|
|
1981
|
+
lastEventCheckpoints: read25(bc)
|
|
1364
1982
|
};
|
|
1365
1983
|
}
|
|
1366
1984
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1367
|
-
|
|
1985
|
+
write25(bc, x.lastEventCheckpoints);
|
|
1368
1986
|
}
|
|
1369
1987
|
function readToEnvoyKvResponse(bc) {
|
|
1370
1988
|
return {
|
|
@@ -1376,6 +1994,46 @@ function writeToEnvoyKvResponse(bc, x) {
|
|
|
1376
1994
|
bare.writeU32(bc, x.requestId);
|
|
1377
1995
|
writeKvResponseData(bc, x.data);
|
|
1378
1996
|
}
|
|
1997
|
+
function readToEnvoySqliteGetPagesResponse(bc) {
|
|
1998
|
+
return {
|
|
1999
|
+
requestId: bare.readU32(bc),
|
|
2000
|
+
data: readSqliteGetPagesResponse(bc)
|
|
2001
|
+
};
|
|
2002
|
+
}
|
|
2003
|
+
function writeToEnvoySqliteGetPagesResponse(bc, x) {
|
|
2004
|
+
bare.writeU32(bc, x.requestId);
|
|
2005
|
+
writeSqliteGetPagesResponse(bc, x.data);
|
|
2006
|
+
}
|
|
2007
|
+
function readToEnvoySqliteCommitResponse(bc) {
|
|
2008
|
+
return {
|
|
2009
|
+
requestId: bare.readU32(bc),
|
|
2010
|
+
data: readSqliteCommitResponse(bc)
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
2013
|
+
function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
2014
|
+
bare.writeU32(bc, x.requestId);
|
|
2015
|
+
writeSqliteCommitResponse(bc, x.data);
|
|
2016
|
+
}
|
|
2017
|
+
function readToEnvoySqliteExecResponse(bc) {
|
|
2018
|
+
return {
|
|
2019
|
+
requestId: bare.readU32(bc),
|
|
2020
|
+
data: readSqliteExecResponse(bc)
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
function writeToEnvoySqliteExecResponse(bc, x) {
|
|
2024
|
+
bare.writeU32(bc, x.requestId);
|
|
2025
|
+
writeSqliteExecResponse(bc, x.data);
|
|
2026
|
+
}
|
|
2027
|
+
function readToEnvoySqliteExecuteResponse(bc) {
|
|
2028
|
+
return {
|
|
2029
|
+
requestId: bare.readU32(bc),
|
|
2030
|
+
data: readSqliteExecuteResponse(bc)
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
function writeToEnvoySqliteExecuteResponse(bc, x) {
|
|
2034
|
+
bare.writeU32(bc, x.requestId);
|
|
2035
|
+
writeSqliteExecuteResponse(bc, x.data);
|
|
2036
|
+
}
|
|
1379
2037
|
function readToEnvoy(bc) {
|
|
1380
2038
|
const offset = bc.offset;
|
|
1381
2039
|
const tag = bare.readU8(bc);
|
|
@@ -1392,6 +2050,14 @@ function readToEnvoy(bc) {
|
|
|
1392
2050
|
return { tag: "ToEnvoyTunnelMessage", val: readToEnvoyTunnelMessage(bc) };
|
|
1393
2051
|
case 5:
|
|
1394
2052
|
return { tag: "ToEnvoyPing", val: readToEnvoyPing(bc) };
|
|
2053
|
+
case 6:
|
|
2054
|
+
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
2055
|
+
case 7:
|
|
2056
|
+
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
2057
|
+
case 8:
|
|
2058
|
+
return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
|
|
2059
|
+
case 9:
|
|
2060
|
+
return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
|
|
1395
2061
|
default: {
|
|
1396
2062
|
bc.offset = offset;
|
|
1397
2063
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1430,6 +2096,26 @@ function writeToEnvoy(bc, x) {
|
|
|
1430
2096
|
writeToEnvoyPing(bc, x.val);
|
|
1431
2097
|
break;
|
|
1432
2098
|
}
|
|
2099
|
+
case "ToEnvoySqliteGetPagesResponse": {
|
|
2100
|
+
bare.writeU8(bc, 6);
|
|
2101
|
+
writeToEnvoySqliteGetPagesResponse(bc, x.val);
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
2104
|
+
case "ToEnvoySqliteCommitResponse": {
|
|
2105
|
+
bare.writeU8(bc, 7);
|
|
2106
|
+
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
2107
|
+
break;
|
|
2108
|
+
}
|
|
2109
|
+
case "ToEnvoySqliteExecResponse": {
|
|
2110
|
+
bare.writeU8(bc, 8);
|
|
2111
|
+
writeToEnvoySqliteExecResponse(bc, x.val);
|
|
2112
|
+
break;
|
|
2113
|
+
}
|
|
2114
|
+
case "ToEnvoySqliteExecuteResponse": {
|
|
2115
|
+
bare.writeU8(bc, 9);
|
|
2116
|
+
writeToEnvoySqliteExecuteResponse(bc, x.val);
|
|
2117
|
+
break;
|
|
2118
|
+
}
|
|
1433
2119
|
}
|
|
1434
2120
|
}
|
|
1435
2121
|
function encodeToEnvoy(x, config) {
|
|
@@ -1636,7 +2322,7 @@ function decodeToOutbound(bytes) {
|
|
|
1636
2322
|
function assert(condition, message) {
|
|
1637
2323
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
1638
2324
|
}
|
|
1639
|
-
var VERSION =
|
|
2325
|
+
var VERSION = 5;
|
|
1640
2326
|
export {
|
|
1641
2327
|
StopActorReason,
|
|
1642
2328
|
StopCode,
|
|
@@ -1695,6 +2381,32 @@ export {
|
|
|
1695
2381
|
readPreloadedKvEntry,
|
|
1696
2382
|
readProtocolMetadata,
|
|
1697
2383
|
readRequestId,
|
|
2384
|
+
readSqliteBindParam,
|
|
2385
|
+
readSqliteColumnValue,
|
|
2386
|
+
readSqliteCommitOk,
|
|
2387
|
+
readSqliteCommitRequest,
|
|
2388
|
+
readSqliteCommitResponse,
|
|
2389
|
+
readSqliteDirtyPage,
|
|
2390
|
+
readSqliteErrorResponse,
|
|
2391
|
+
readSqliteExecOk,
|
|
2392
|
+
readSqliteExecRequest,
|
|
2393
|
+
readSqliteExecResponse,
|
|
2394
|
+
readSqliteExecuteOk,
|
|
2395
|
+
readSqliteExecuteRequest,
|
|
2396
|
+
readSqliteExecuteResponse,
|
|
2397
|
+
readSqliteExecuteResult,
|
|
2398
|
+
readSqliteFetchedPage,
|
|
2399
|
+
readSqliteGeneration,
|
|
2400
|
+
readSqliteGetPagesOk,
|
|
2401
|
+
readSqliteGetPagesRequest,
|
|
2402
|
+
readSqliteGetPagesResponse,
|
|
2403
|
+
readSqlitePageBytes,
|
|
2404
|
+
readSqlitePgno,
|
|
2405
|
+
readSqliteQueryResult,
|
|
2406
|
+
readSqliteValueBlob,
|
|
2407
|
+
readSqliteValueFloat,
|
|
2408
|
+
readSqliteValueInteger,
|
|
2409
|
+
readSqliteValueText,
|
|
1698
2410
|
readStopActorReason,
|
|
1699
2411
|
readStopCode,
|
|
1700
2412
|
readToEnvoy,
|
|
@@ -1707,6 +2419,10 @@ export {
|
|
|
1707
2419
|
readToEnvoyPing,
|
|
1708
2420
|
readToEnvoyRequestChunk,
|
|
1709
2421
|
readToEnvoyRequestStart,
|
|
2422
|
+
readToEnvoySqliteCommitResponse,
|
|
2423
|
+
readToEnvoySqliteExecResponse,
|
|
2424
|
+
readToEnvoySqliteExecuteResponse,
|
|
2425
|
+
readToEnvoySqliteGetPagesResponse,
|
|
1710
2426
|
readToEnvoyTunnelMessage,
|
|
1711
2427
|
readToEnvoyTunnelMessageKind,
|
|
1712
2428
|
readToEnvoyWebSocketClose,
|
|
@@ -1724,6 +2440,10 @@ export {
|
|
|
1724
2440
|
readToRivetPong,
|
|
1725
2441
|
readToRivetResponseChunk,
|
|
1726
2442
|
readToRivetResponseStart,
|
|
2443
|
+
readToRivetSqliteCommitRequest,
|
|
2444
|
+
readToRivetSqliteExecRequest,
|
|
2445
|
+
readToRivetSqliteExecuteRequest,
|
|
2446
|
+
readToRivetSqliteGetPagesRequest,
|
|
1727
2447
|
readToRivetTunnelMessage,
|
|
1728
2448
|
readToRivetTunnelMessageKind,
|
|
1729
2449
|
readToRivetWebSocketClose,
|
|
@@ -1772,6 +2492,32 @@ export {
|
|
|
1772
2492
|
writePreloadedKvEntry,
|
|
1773
2493
|
writeProtocolMetadata,
|
|
1774
2494
|
writeRequestId,
|
|
2495
|
+
writeSqliteBindParam,
|
|
2496
|
+
writeSqliteColumnValue,
|
|
2497
|
+
writeSqliteCommitOk,
|
|
2498
|
+
writeSqliteCommitRequest,
|
|
2499
|
+
writeSqliteCommitResponse,
|
|
2500
|
+
writeSqliteDirtyPage,
|
|
2501
|
+
writeSqliteErrorResponse,
|
|
2502
|
+
writeSqliteExecOk,
|
|
2503
|
+
writeSqliteExecRequest,
|
|
2504
|
+
writeSqliteExecResponse,
|
|
2505
|
+
writeSqliteExecuteOk,
|
|
2506
|
+
writeSqliteExecuteRequest,
|
|
2507
|
+
writeSqliteExecuteResponse,
|
|
2508
|
+
writeSqliteExecuteResult,
|
|
2509
|
+
writeSqliteFetchedPage,
|
|
2510
|
+
writeSqliteGeneration,
|
|
2511
|
+
writeSqliteGetPagesOk,
|
|
2512
|
+
writeSqliteGetPagesRequest,
|
|
2513
|
+
writeSqliteGetPagesResponse,
|
|
2514
|
+
writeSqlitePageBytes,
|
|
2515
|
+
writeSqlitePgno,
|
|
2516
|
+
writeSqliteQueryResult,
|
|
2517
|
+
writeSqliteValueBlob,
|
|
2518
|
+
writeSqliteValueFloat,
|
|
2519
|
+
writeSqliteValueInteger,
|
|
2520
|
+
writeSqliteValueText,
|
|
1775
2521
|
writeStopActorReason,
|
|
1776
2522
|
writeStopCode,
|
|
1777
2523
|
writeToEnvoy,
|
|
@@ -1784,6 +2530,10 @@ export {
|
|
|
1784
2530
|
writeToEnvoyPing,
|
|
1785
2531
|
writeToEnvoyRequestChunk,
|
|
1786
2532
|
writeToEnvoyRequestStart,
|
|
2533
|
+
writeToEnvoySqliteCommitResponse,
|
|
2534
|
+
writeToEnvoySqliteExecResponse,
|
|
2535
|
+
writeToEnvoySqliteExecuteResponse,
|
|
2536
|
+
writeToEnvoySqliteGetPagesResponse,
|
|
1787
2537
|
writeToEnvoyTunnelMessage,
|
|
1788
2538
|
writeToEnvoyTunnelMessageKind,
|
|
1789
2539
|
writeToEnvoyWebSocketClose,
|
|
@@ -1801,6 +2551,10 @@ export {
|
|
|
1801
2551
|
writeToRivetPong,
|
|
1802
2552
|
writeToRivetResponseChunk,
|
|
1803
2553
|
writeToRivetResponseStart,
|
|
2554
|
+
writeToRivetSqliteCommitRequest,
|
|
2555
|
+
writeToRivetSqliteExecRequest,
|
|
2556
|
+
writeToRivetSqliteExecuteRequest,
|
|
2557
|
+
writeToRivetSqliteGetPagesRequest,
|
|
1804
2558
|
writeToRivetTunnelMessage,
|
|
1805
2559
|
writeToRivetTunnelMessageKind,
|
|
1806
2560
|
writeToRivetWebSocketClose,
|