On Dec 31, 2013, at 11:50 AM, Jannick <[email protected]> wrote:
> Derek Atkins <derek <at> ihtfp.com> writes: > > Hi, > >> On Tue, December 31, 2013 11:36 am, Emmanuel Florent wrote: >>>> Coming from another (back-)end: Do you know if someone has gone down the >>>> implementation route to import data into the MySQL db? >>> >>> >>> Is that right that Gnucash empty all the tables in db then rewrite them so >>> the db bridge is not possible in your case ? >> >> As John already answered, no, GnuCash doesn't empty and rewrite your >> tables for you (except in certain limited cases, like File -> Save As). > > This implies that GnuCash fires up some updating commands when it comes to > updating are creating transactions - or am I missing something here? This > might be why GnuCash runs a lot faster when connected to the mySQL server > (in contrast to having loaded the db from the hard drive) I guess. It updates the database after any change to the in-memory data. At least we think it does, but we don’t yet have complete test coverage to be sure that we haven’t missed something in our audits. > >> However, GnuCash DOES NOT support you writing to the database behind it. >> To write the DB you *MUST* use the GnuCash API (in C, Scheme, or Python). > > This *is* a very good point. For the benefit of my better understanding: > Given my first guess above is correct, then how does GC work when it comes > to manually input data or insert it via the AqBanking interface (HBCI)? What > does it do when information are handed in? It parses the incoming stream and converts it to internal data structures, prompting the user via a dialog box to assign the accounts for each side of the transactions, then runs data-integrity routines on each transaction to ensure that the transaction balances, creating an imbalance-account-split if it doesn’t. If you’re using the SQL backend it updates the various affected tables immediately, otherwise it sets the book dirty flag. Regards, John Ralls _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
