4 ms·
The experimental directory of `beancount` has some code for converting beancount data structures into SQL structures [1]. You could also take a look at the dat
by gen220 4y ago
The experimental directory of `beancount` has some code for converting beancount data structures into SQL structures [1].
You could also take a look at the data structures used by GNU Ledger (e.g. account [2]) and transcribe them to SQL. A bit more work, but probably educational.
[1]: https://github.com/beancount/beancount/blob/1f180e717680813931e868ad748fd51e5da876e0/experiments/sql/sql.py https://github.com/beancount/beancount/blob/1f180e7176808139...
[2]: https://github.com/ledger/ledger/blob/master/src/account.h https://github.com/ledger/ledger/blob/master/src/account.h