beancount / beanquery

A customizable lightweight SQL query tool that works on tabular data, including Beancount.
GNU General Public License v2.0
20 stars 12 forks source link

Find a better solution for the `OPEN ON`, `CLOSE ON` and `CLEAR` clauses #179

Open dnicolodi opened 5 months ago

dnicolodi commented 5 months ago

Quoting from TODO.md:

The OPEN ON and CLOSE ON syntaxes get on my nerves.

I'm not so bothered by the syntax, but it is a very Beancount centric extension of the SQL syntax that maybe could be expressed in a nicer way without leaking the domain specific issue into the general purpose query language. However, no better syntax comes to mind.

blais commented 5 months ago

I gave this some thought in the past: these could be part of the table specification, e.g., ```

SELECT date, narration FROM beancount(/path/to/filename)

with options, e.g.

SELECT date, narration FROM beancount(/path/to/filename, open=2021-01-01, close=2022-01-01)