Electric.Replication.TransactionBuilder (electric v1.4.13)

View Source

Builds complete transactions from a stream of TransactionFragments.

Takes TransactionFragments containing begin, commit, and changes, and builds up Transaction structs. Returns complete transactions when a fragment with a commit is seen.

Summary

Functions

Build transactions from a TransactionFragment.

Types

t()

@type t() :: %Electric.Replication.TransactionBuilder{
  transaction: nil | Electric.Replication.Changes.Transaction.t()
}

Functions

build(fragment, state)

Build transactions from a TransactionFragment.

Returns a tuple of {results, state} where results is a list of complete transactions, and state is the updated builder state containing any partial transaction.

new()