AshCsvInterchange.Export.Serializer (AshCsvInterchange v0.1.0)

Copy Markdown View Source

Renders Ash records into CSV cells per the column declarations on an AshCsvInterchange.Export.Type.

Formatter resolution for {header, field, opts}:

  • no format: opt: to_string(value)
  • 1-arity function capture: to_string(fun.(value))
  • {m, f, args}: to_string(apply(m, f, [value | args]))

Nil values render as empty cells; the formatter is not called for them.

The serializer does not introspect Ash types. The orchestrator must load any calculations or relationships the columns reference.

Summary

Functions

Returns the column header strings in declaration order.

Returns the CSV cells for record in column order.

Functions

header(columns)

Returns the column header strings in declaration order.

row(record, columns)

Returns the CSV cells for record in column order.