Beancount.Schemas.Custom (beancount_ex v0.6.0)

Copy Markdown View Source

Persisted custom directive (table beancount_customs).

Storage-layer counterpart of Beancount.Directives.Custom.

Fields

  • date - the day of the custom entry.
  • type - custom directive type string, e.g. "budget".
  • values - list of serialized value maps. Beancount.Storage encodes each value as %{"type" => ..., "value" => ...} so mixed value kinds (decimal, date, account, tag, amount, string, boolean) survive a JSON round-trip.
  • metadata - arbitrary key/value map.
  • file_order - zero-based position of the directive in the source.

Example

%Beancount.Schemas.Custom{
  date: ~D[2026-01-06],
  type: "budget",
  values: [
    %{"type" => "string", "value" => "groceries"},
    %{"type" => "decimal", "value" => "500"}
  ],
  metadata: %{},
  file_order: 13
}

Summary

Types

t()

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