[GNC] Database Manipulation

John Ralls jralls at ceridwen.us
Sat Jul 18 23:52:22 EDT 2020


Please remember to copy the list on all replies.

The only supported way to access and especially modify data is using the GnuCash API; in addition to C we provide Scheme and Python bindings that are a bit friendlier for scripting.

Regards,
John Ralls

> On Jul 18, 2020, at 7:01 PM, Jon Griffith <jon at jongriffith.com> wrote:
> 
> I figured that much.  If I do make any changes, I've needed to fire it up again for those changes to be evident...I'm testing it all on a junk database so I can learn where things change when actions happen...just in case I want to write up some scripts to access the data elsewhere.
> 
> On Sat, Jul 18, 2020 at 6:43 PM John Ralls <jralls at ceridwen.us> wrote:
> No. It is not safe to make any changes to the database while GnuCash is connected to it because GnuCash reads the database only at the start of the session and only writes after that. If you remove objects from the database you should be careful to clean up all of the references to them as well--and of course that will be recursive. Note that GnuCash doesn't set any relations in the database so you won't be able to use the usual referential integrity tools.
> 
> Regards,
> John Ralls
> 
> > On Jul 18, 2020, at 2:47 PM, Jon Griffith <jon at jongriffith.com> wrote:
> > 
> > If I'm in the middle of creating an invoice, prior to that invoice being
> > posted, is it safe to delete the associated line items from `entries` and
> > `invoices` directly from MySQL in order to remove it altogether?
> > 
> > 
> > 
> > 
> > -- 
> > [image: photo]
> > *Jon Griffith*
> > REALTOR®, HomeSmart
> > 
> > 480-463-4062 | jon at jongriffith.com
> > 
> > http://realtor.jongriffith.com
> > 10601 N. Hayden Road, Suite I-100 | @RealScottsdale
> > <http://facebook.com/realscottsdaleliving>
> > <http://twitter.com/realscottsdale>
> > <http://www.youtube.com/realscottsdaleliving>
> > <http://www.linkedin.com/in/jonathangriffith>
> > Get your own email signature
> > <https://www.wisestamp.com/signature-in-email?utm_source=promotion&utm_medium=signature&utm_campaign=get_your_own&srcid=4578964714553344>
> > _______________________________________________
> > gnucash-user mailing list
> > gnucash-user at gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> 
> 
> 
> -- 
> 		
> Jon Griffith
> REALTOR®, HomeSmart
> 480-463-4062  | jon at jongriffith.com
> http://realtor.jongriffith.com
> 10601 N. Hayden Road, Suite I-100 | @RealScottsdale
> 			
> Get your own  email signature



More information about the gnucash-user mailing list