Skip to content

Add support for parameters in query directives #249

@hhmitchell

Description

@hhmitchell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions