View Source Electric.LogItems (electric v1.0.1)
Defines the structure and how to create the items in the log that the electric client reads.
The log_item() data structure is a map for ease of consumption in the Elixir code, however when JSON encoded (not done in this module) it's the format that the electric client accepts.
Summary
Types
@type log_item() :: {Electric.Replication.LogOffset.t(), %{key: String.t(), value: map(), headers: map()}}
Functions
@spec from_change( Electric.Replication.Changes.data_change(), txids :: nil | non_neg_integer() | [non_neg_integer(), ...], pk_cols :: [String.t()], replica :: Electric.Shapes.Shape.replica() ) :: [log_item(), ...]