Skip to content

Add custom table for querying custom directives - #282

Open
yeatse wants to merge 1 commit into
beancount:masterfrom
yeatse:feature/custom-table
Open

Add custom table for querying custom directives#282
yeatse wants to merge 1 commit into
beancount:masterfrom
yeatse:feature/custom-table

Conversation

@yeatse

@yeatse yeatse commented May 16, 2026

Copy link
Copy Markdown

Summary

Adds a custom table exposing Beancount custom directives, with the same shape as the existing notes / events / documents tables.

Columns:

Column Type Description
meta dict Directive metadata (filename, lineno, …)
date date Directive date
type str The custom directive type string
values list Typed values as parsed by Beancount

Example::

SELECT date, type, values FROM custom WHERE type = 'budget' ORDER BY date

Test plan

  • New beanquery/custom_test.py covers: column schema, SELECT * wildcard excludes meta, row contents with mixed value types (string / Amount / date), WHERE type = filtering, meta contents, empty ledger
  • Updated shell_test.py .tables expectation
  • Full suite: 299 passed

@yeatse yeatse closed this Aug 13, 2026
@yeatse yeatse reopened this Aug 13, 2026
Expose Beancount ``custom`` directives as a queryable table with
``meta``, ``date``, ``type``, and ``values`` columns, mirroring the
existing ``notes`` / ``events`` / ``documents`` tables. ``values`` is a
list of typed values as parsed by Beancount.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yeatse
yeatse force-pushed the feature/custom-table branch from d46acf5 to f4bf1cf Compare August 13, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant