@@ -25,6 +25,7 @@ export interface PostgresBucketBatchOptions {
2525 logger : Logger ;
2626 db : lib_postgres . DatabaseClient ;
2727 sync_rules : sync_rules . SqlSyncRules ;
28+ syncRulesId : string ;
2829 group_id : number ;
2930 slot_name : string ;
3031 last_checkpoint_lsn : string | null ;
@@ -73,6 +74,7 @@ export class PostgresBucketBatch
7374
7475 protected write_checkpoint_batch : storage . CustomWriteCheckpointOptions [ ] ;
7576 protected readonly sync_rules : sync_rules . SqlSyncRules ;
77+ private readonly syncRulesId : string ;
7678 protected batch : OperationBatch | null ;
7779 private lastWaitingLogThrottled = 0 ;
7880 private markRecordUnavailable : BucketStorageMarkRecordUnavailable | undefined ;
@@ -88,6 +90,7 @@ export class PostgresBucketBatch
8890 this . resumeFromLsn = options . resumeFromLsn ;
8991 this . write_checkpoint_batch = [ ] ;
9092 this . sync_rules = options . sync_rules ;
93+ this . syncRulesId = options . syncRulesId ;
9194 this . markRecordUnavailable = options . markRecordUnavailable ;
9295 this . batch = null ;
9396 this . persisted_op = null ;
@@ -825,7 +828,8 @@ export class PostgresBucketBatch
825828 if ( sourceTable . syncData ) {
826829 const { results : evaluated , errors : syncErrors } = this . sync_rules . evaluateRowWithErrors ( {
827830 record : after ,
828- sourceTable
831+ sourceTable,
832+ bucketIdTransformer : sync_rules . SqlSyncRules . versionedBucketIdTransformer ( this . syncRulesId )
829833 } ) ;
830834
831835 for ( const error of syncErrors ) {
0 commit comments