@@ -357,6 +357,74 @@ exports[`sync - postgres > sync legacy non-raw data 1`] = `
357
357
]
358
358
` ;
359
359
360
+ exports [` sync - postgres > sync updates to data query only 1` ] = `
361
+ [
362
+ {
363
+ " checkpoint" : {
364
+ " buckets" : [
365
+ {
366
+ " bucket" : " by_user[" user1 " ]" ,
367
+ " checksum" : 0 ,
368
+ " count" : 0 ,
369
+ " priority" : 3 ,
370
+ },
371
+ ],
372
+ " last_op_id" : " 1" ,
373
+ " write_checkpoint" : undefined ,
374
+ },
375
+ } ,
376
+ {
377
+ " checkpoint_complete" : {
378
+ " last_op_id" : " 1" ,
379
+ },
380
+ } ,
381
+ ]
382
+ ` ;
383
+
384
+ exports [` sync - postgres > sync updates to data query only 2` ] = `
385
+ [
386
+ {
387
+ " checkpoint_diff" : {
388
+ " last_op_id" : " 2" ,
389
+ " removed_buckets" : [],
390
+ " updated_buckets" : [
391
+ {
392
+ " bucket" : " by_user[" user1 " ]" ,
393
+ " checksum" : 1418351250 ,
394
+ " count" : 1 ,
395
+ " priority" : 3 ,
396
+ },
397
+ ],
398
+ " write_checkpoint" : undefined ,
399
+ },
400
+ } ,
401
+ {
402
+ " data" : {
403
+ " after" : " 0" ,
404
+ " bucket" : " by_user[" user1 " ]" ,
405
+ " data" : [
406
+ {
407
+ " checksum" : 1418351250n ,
408
+ " data" : " {" id " :" list1 " ," user_id " :" user1 " ," name " :" User 1 " }" ,
409
+ " object_id" : " list1" ,
410
+ " object_type" : " lists" ,
411
+ " op" : " PUT" ,
412
+ " op_id" : " 2" ,
413
+ " subkey" : " 5ad0aa14-3d5e-5428-ad5b-2c33927d991c" ,
414
+ },
415
+ ],
416
+ " has_more" : false ,
417
+ " next_after" : " 2" ,
418
+ },
419
+ } ,
420
+ {
421
+ " checkpoint_complete" : {
422
+ " last_op_id" : " 2" ,
423
+ },
424
+ } ,
425
+ ]
426
+ ` ;
427
+
360
428
exports [` sync - postgres > sync updates to global data 1` ] = `
361
429
[
362
430
{
@@ -468,3 +536,106 @@ exports[`sync - postgres > sync updates to global data 3`] = `
468
536
} ,
469
537
]
470
538
` ;
539
+
540
+ exports [` sync - postgres > sync updates to parameter query + data 1` ] = `
541
+ [
542
+ {
543
+ " checkpoint" : {
544
+ " buckets" : [],
545
+ " last_op_id" : " 0" ,
546
+ " write_checkpoint" : undefined ,
547
+ },
548
+ } ,
549
+ {
550
+ " checkpoint_complete" : {
551
+ " last_op_id" : " 0" ,
552
+ },
553
+ } ,
554
+ ]
555
+ ` ;
556
+
557
+ exports [` sync - postgres > sync updates to parameter query + data 2` ] = `
558
+ [
559
+ {
560
+ " checkpoint_diff" : {
561
+ " last_op_id" : " 2" ,
562
+ " removed_buckets" : [],
563
+ " updated_buckets" : [
564
+ {
565
+ " bucket" : " by_user[" user1 " ]" ,
566
+ " checksum" : 1418351250 ,
567
+ " count" : 1 ,
568
+ " priority" : 3 ,
569
+ },
570
+ ],
571
+ " write_checkpoint" : undefined ,
572
+ },
573
+ } ,
574
+ {
575
+ " data" : {
576
+ " after" : " 0" ,
577
+ " bucket" : " by_user[" user1 " ]" ,
578
+ " data" : [
579
+ {
580
+ " checksum" : 1418351250n ,
581
+ " data" : " {" id " :" list1 " ," user_id " :" user1 " ," name " :" User 1 " }" ,
582
+ " object_id" : " list1" ,
583
+ " object_type" : " lists" ,
584
+ " op" : " PUT" ,
585
+ " op_id" : " 1" ,
586
+ " subkey" : " 5ad0aa14-3d5e-5428-ad5b-2c33927d991c" ,
587
+ },
588
+ ],
589
+ " has_more" : false ,
590
+ " next_after" : " 1" ,
591
+ },
592
+ } ,
593
+ {
594
+ " checkpoint_complete" : {
595
+ " last_op_id" : " 2" ,
596
+ },
597
+ } ,
598
+ ]
599
+ ` ;
600
+
601
+ exports [` sync - postgres > sync updates to parameter query only 1` ] = `
602
+ [
603
+ {
604
+ " checkpoint" : {
605
+ " buckets" : [],
606
+ " last_op_id" : " 0" ,
607
+ " write_checkpoint" : undefined ,
608
+ },
609
+ } ,
610
+ {
611
+ " checkpoint_complete" : {
612
+ " last_op_id" : " 0" ,
613
+ },
614
+ } ,
615
+ ]
616
+ ` ;
617
+
618
+ exports [` sync - postgres > sync updates to parameter query only 2` ] = `
619
+ [
620
+ {
621
+ " checkpoint_diff" : {
622
+ " last_op_id" : " 1" ,
623
+ " removed_buckets" : [],
624
+ " updated_buckets" : [
625
+ {
626
+ " bucket" : " by_user[" user1 " ]" ,
627
+ " checksum" : 0 ,
628
+ " count" : 0 ,
629
+ " priority" : 3 ,
630
+ },
631
+ ],
632
+ " write_checkpoint" : undefined ,
633
+ },
634
+ } ,
635
+ {
636
+ " checkpoint_complete" : {
637
+ " last_op_id" : " 1" ,
638
+ },
639
+ } ,
640
+ ]
641
+ ` ;
0 commit comments