Beancount.Schemas.Open (beancount_ex v0.6.0)

Copy Markdown View Source

Persisted open directive (table beancount_opens).

Storage-layer counterpart of Beancount.Directives.Open. Rows are written by Beancount.Storage.store/1 and rebuilt into directive structs by Beancount.Storage.load/0.

Fields

  • date - the day the account opens.
  • account - colon-separated account name, e.g. "Assets:Bank".
  • currencies - list of allowed commodity symbols, e.g. ["USD", "EUR"] (nil/empty means any).
  • booking - booking method string ("STRICT", "FIFO", "LIFO", "AVERAGE", "NONE"), or nil.
  • metadata - arbitrary key/value map.
  • file_order - zero-based position of the directive in the source.

Example

%Beancount.Schemas.Open{
  date: ~D[2026-01-01],
  account: "Assets:Bank",
  currencies: ["USD"],
  booking: nil,
  metadata: %{},
  file_order: 0
}

Summary

Types

t()

@type t() :: %Beancount.Schemas.Open{
  __meta__: term(),
  account: term(),
  booking: term(),
  currencies: term(),
  date: term(),
  file_order: term(),
  id: term(),
  inserted_at: term(),
  metadata: term(),
  updated_at: term()
}