Skip to content

Commit

Permalink
map compensation message to replication update
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetised committed Nov 9, 2023
1 parent 6628142 commit be69b14
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,13 @@ defmodule Electric.Replication.Postgres.SlotServer do
}
end

defp changes_to_wal(%Changes.Compensation{relation: table, record: new}, relations) do
%ReplicationMessages.Update{
relation_id: relations[table].oid,
tuple_data: record_to_tuple(new, relations[table].columns)
}
end

defp changes_to_wal(
%Changes.UpdatedRecord{relation: table, old_record: nil, record: new},
relations
Expand Down

0 comments on commit be69b14

Please sign in to comment.