F3. Inspection
(F3 v0.1.0)
Copy Markdown
Text and JSON rendering of F3.Metadata.
The JSON form is F3.Metadata.to_map/1. It has string keys and no column
payloads. Text never prints file bytes.
Summary
Functions
Renders metadata as text or JSON.
Functions
@spec render(F3.Metadata.t(), :text | :json, boolean()) :: String.t()
Renders metadata as text or JSON.
format is :text or :json. detail adds row groups and sections when
format is :text. JSON ignores detail and is F3.Metadata.to_map/1.
Any other format raises FunctionClauseError. The text does not include
column bytes.
Examples
iex> {:ok, file} = F3.open("test/fixtures/small.f3")
iex> {:ok, meta} = F3.metadata(file)
iex> F3.Inspection.render(meta, :text, false) =~ "rows: 3"
true