Python bindings: patch, documentation, examples

David Osguthorpe david.osguthorpe at
Tue Jan 14 13:59:13 EST 2014

> > 
> > what is the Query interface - is that the libqof functions??
> > 
> > Is there an example which shows how this is done  - I dont remember seeing any query functions
> > for budgets in gnc-budget.c
> The current interface is QOFQuery. All of the persistent objects in Engine implement the QOFObject interface which QOFQuery uses, so it's available for Budgets regardless of whether the gnc-budget code uses it. You must *not* look at code in src/engine for examples of what to do: That code is private and is going to change a *lot* in the coming dev cycle. Look instead at src/report. 

> I can't be certain that we'll get to replacing QOFQuery in this cycle, but we will eventually replace it with SQL when we migrate to using the database as a database instead of a mere persistence store, so be sure to abstract your query code so that it can be easily replaced.

Ill see if I can use the Query class in python which seems to wrap qof query
- although the current bindings do not seem to make use of this at all
so will not look at changing c code


More information about the gnucash-devel mailing list