Persisted query directive (table beancount_queries).
Storage-layer counterpart of Beancount.Directives.Query.
Fields
date- the day the named query is associated with.name- query name, e.g."monthly-expenses".bql- the BQL query string.metadata- arbitrary key/value map.file_order- zero-based position of the directive in the source.
Example
%Beancount.Schemas.Query{
date: ~D[2026-01-08],
name: "recent",
bql: "SELECT date, account, position",
metadata: %{},
file_order: 15
}