Carbonite.Transaction (Carbonite v0.3.1) View Source
A Carbonite.Transaction
is the binding link between change records of tables.
As such, it contains a set of optional metadata that describes the transaction.
Link to this section Summary
Functions
Builds a changeset for a new Carbonite.Transaction
.
Returns the currently stored metadata.
Stores a piece of metadata in the process dictionary.
Link to this section Types
Specs
meta() :: map()
Specs
t() :: %Carbonite.Transaction{ __meta__: term(), changes: Ecto.Association.NotLoaded.t() | [Carbonite.Change.t()], id: non_neg_integer(), inserted_at: DateTime.t(), meta: meta(), processed_at: DateTime.t() }
Link to this section Functions
Specs
changeset(params :: map()) :: Ecto.Changeset.t()
Builds a changeset for a new Carbonite.Transaction
.
The :meta
map from the params will be merged with the metadata currently stored in the
process dictionary.
Specs
current_meta() :: meta()
Returns the currently stored metadata.
Specs
Stores a piece of metadata in the process dictionary.
This can be useful in situations where you want to record a value at a system boundary (say,
the user's account_id
) without having to pass it through to the database transaction.
Returns the currently stored metadata.