Chary, Thanks for your interest and good questions!
> On Apr 24, 2024, at 3:22 PM, Chary Chary <[email protected]> wrote: > > Question 1: What can you do with beanpost, what you can't do with beanquery? I think there are two key differences between beanpost and beanquery: the SQL ecosystem and integration with other systems. At a basic level, the query syntax for beanquery is similar to PostgreSQL as used in beanpost. However, as Martin points out in the "Motivation" section of the beanquery documentation (https://beancount.github.io/docs/beancount_query_language.html), writing pure SQL queries for Beancount data can be challenging, which is why he created beanquery to offer a "SQL-like query client." The beanquery client has extra features that simplify query writing compared to pure SQL. I have already implemented some of these features in beanpost, but working with pure SQL may never be as straightforward as using a specialized query language like beanquery. However, beanquery is an "SQL-like" language, while beanpost uses PostgreSQL. This means we have the full power of a real database with standard SQL and aren't limited to the features provided by beanquery. In theory, any query or data manipulation is possible. For example, I wrote a function in PostgreSQL to calculate an average cost basis—a feature not provided by Beancount (as far as I know; someone correct me if I'm wrong), which would probably be impossible to implement with beanquery. Additionally, PostgreSQL is an industry-standard tool and can be used as a back-end for various clients, such as custom web apps, reporting tools, and more. These kinds of integrations aren't really feasible with beanquery. > Question 2: The documentation says: > > Transaction dates: Each posting can have its own date, allowing transactions > to balance even if individual postings have different dates. This helps with > common issues when transferring money between accounts where withdrawal and > deposit dates differ. > How do you achieve this, if initially the database is created by importing > beancount file, which has only one date per transaction? On import into the database, we assign the beancount transaction date to each posting. On export to a beancount file, since beancount doesn't support dated postings, we use the date of the first posting for the transaction date. I hope this answers your questions. If you have more queries or need further clarification, I'm happy to help. Best regards, Ben -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/8811E442-DE73-406F-AA47-47AC302C4802%40gerdemann.org.
