Electric.Shapes.Consumer.TransactionConverter (electric v1.6.2)

Copy Markdown View Source

Summary

Types

convert_opts()

@type convert_opts() :: keyword()

Functions

transaction_to_effects(txn, shape, opts \\ [])

@spec transaction_to_effects(
  Electric.Replication.Changes.Transaction.t(),
  Electric.Shapes.Shape.t(),
  convert_opts()
) ::
  {:ok, [Electric.Shapes.Consumer.Effects.t()]}
  | {:error, {:truncate, Electric.Replication.Changes.xid() | nil}}

transactions_to_effects(txns, shape, opts \\ [])

@spec transactions_to_effects(
  [Electric.Replication.Changes.Transaction.t()],
  Electric.Shapes.Shape.t(),
  convert_opts()
) ::
  {:ok, [Electric.Shapes.Consumer.Effects.t()]}
  | {:error, {:truncate, Electric.Replication.Changes.xid() | nil}}