beanquery
beanquery copied to clipboard
Add support for parameters in query directives
Currently query directives defined in a ledger can only be run as written, but it would allow for more powerful queries if they could take parameters. As a trivial example:
2100-12-31 query "foo" "select date limit %d"
Then .run foo 3 would execute the query with 3 substituted as the limit. More realistically, we could have queries like:
2100-12-31 query "bar" "select ... where year = %d and account = %s ..."
and so forth.
Brief discussion: https://groups.google.com/g/beancount/c/td18CgN1y-0