setTableReplicationTransform<TableDsl extends Table, D> abstract method
void
setTableReplicationTransform<TableDsl extends Table, D>(
- TableInfo<
TableDsl, D> table, { - required Insertable<
D> transformInbound(- D row
- required Insertable<
D> transformOutbound(- D row
- Insertable<
D> toInsertable(- D
Puts transforms in place such that any data being replicated to or from this table is first handled appropriately while retaining type consistency.
Can be used to encrypt sensitive fields before they are replicated outside of their secure local source.
NOTE: usage is discouraged, but ensure transforms are set before replication is initiated using syncTable to avoid partially transformed tables.
Implementation
void setTableReplicationTransform<TableDsl extends Table, D>(
TableInfo<TableDsl, D> table, {
required Insertable<D> Function(D row) transformInbound,
required Insertable<D> Function(D row) transformOutbound,
Insertable<D> Function(D)? toInsertable,
});