Beancount.Schemas.Option (beancount_ex v0.6.0)

Copy Markdown View Source

Persisted option directive (table beancount_options).

Storage-layer counterpart of Beancount.Directives.Option. This directive has no date. The value is stored as a type-tagged map (%{"type" => ..., "value" => ...}) so that booleans, Decimal, and Date values round-trip without being flattened to strings.

Fields

  • name - option key, e.g. "operating_currency".
  • value - type-tagged option value map, e.g. %{"type" => "string", "value" => "USD"}.
  • file_order - zero-based position of the directive in the source.

Example

%Beancount.Schemas.Option{
  name: "operating_currency",
  value: %{"type" => "string", "value" => "USD"},
  file_order: 0
}

Summary

Types

t()

@type t() :: %Beancount.Schemas.Option{
  __meta__: term(),
  file_order: term(),
  id: term(),
  inserted_at: term(),
  name: term(),
  updated_at: term(),
  value: term()
}