AshCsvInterchange.Import.RowOutcome (AshCsvInterchange v0.1.0)

Copy Markdown View Source

The result of processing a single CSV row.

Status values:

  • :ok (dry-run) — changeset valid, not persisted
  • :ok (commit) — persisted; :upsert_kind is :created or :updated
  • :invalid (dry-run) — changeset has validation errors; see :errors
  • :errored (commit) — Ash.create/1 returned {:error, _}; see :errors
  • :crashed (both) — exception caught during row processing; see :errors

Summary

Types

status()

@type status() :: :ok | :invalid | :errored | :crashed

t()

@type t() :: %AshCsvInterchange.Import.RowOutcome{
  errors: list() | nil,
  input: map() | nil,
  line_no: pos_integer(),
  record: struct() | nil,
  status: status(),
  upsert_kind: upsert_kind()
}

upsert_kind()

@type upsert_kind() :: :created | :updated | nil