electric
electric copied to clipboard
Helper to return the write id
Something like:
{:ok, write_id} =
Electric.Client.transaction_with_write_id(Repo, fn ->
Repo.update(changeset)
end)
(?)
Write id implementation:
- transaction xid
- metadata column in table
For the latter then we could add helpers to create the column in migrations, much like ecto's timestamps()
I think it makes sense to add this functionality here, rather than in electric phoenix as this is not phoenix specific.
Implemented here: https://github.com/electric-sql/phoenix_sync/pull/14