Beancount.Schemas.Commodity (beancount_ex v0.6.0)

Copy Markdown View Source

Persisted commodity directive (table beancount_commodities).

Storage-layer counterpart of Beancount.Directives.Commodity.

Fields

  • date - declaration date of the commodity.
  • currency - commodity symbol, e.g. "USD" or "AAPL".
  • metadata - arbitrary key/value map (e.g. %{"name" => "Apple Inc."}).
  • file_order - zero-based position of the directive in the source.

Example

%Beancount.Schemas.Commodity{
  date: ~D[2026-01-01],
  currency: "AAPL",
  metadata: %{"name" => "Apple Inc."},
  file_order: 1
}

Summary

Types

t()

@type t() :: %Beancount.Schemas.Commodity{
  __meta__: term(),
  currency: term(),
  date: term(),
  file_order: term(),
  id: term(),
  inserted_at: term(),
  metadata: term(),
  updated_at: term()
}