beancount / beanquery

A customizable light-weight SQL query tool that works on tabular data, including Beancount.
GNU General Public License v2.0
17 stars 11 forks source link

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

Open dnicolodi opened 1 week ago

dnicolodi commented 1 week 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 1 week 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)