Capstan.Change (Capstan v0.1.0)

Copy Markdown View Source

A single row change within a Capstan.Transaction.

record is the row AFTER the change — a column_name => value map — present for :insert/:update and nil for :delete. old_record is the row BEFORE the change, present for :update/:delete and nil for :insert.

Column VALUES are user data (Rule 1) — never logged or attached to telemetry. Column NAMES stay strings, never atoms (a wide or attacker-influenced schema must not exhaust the atom table).

Summary

Types

t()

@type t() :: %Capstan.Change{
  old_record: map() | nil,
  op: :insert | :update | :delete,
  record: map() | nil,
  schema: String.t(),
  table: String.t()
}