Maps one durable Docket.Run to its Postgres row.
Postgres columns are the sole copy of fields needed for identity,
claiming, scheduling, inspection, and constraints. Every other run field
is one opaque ETF value in state.
Summary
Types
@type row_attrs() :: %{ run_id: String.t(), graph_id: String.t(), graph_hash: String.t() | nil, status: Docket.Run.durable_status(), step: non_neg_integer(), state: binary(), checkpoint_seq: non_neg_integer(), started_at: DateTime.t() | nil, updated_at: DateTime.t() | nil, finished_at: DateTime.t() | nil }
Functions
@spec dump(Docket.Run.t()) :: {:ok, row_attrs()} | {:error, Docket.Error.t()}
@spec load(Docket.Postgres.Schemas.Run.t() | map()) :: {:ok, Docket.Run.t()} | {:error, Docket.Error.t()}
@spec load!(Docket.Postgres.Schemas.Run.t() | map()) :: Docket.Run.t()