GC, QOF and queries

Phil Longstaff plongstaff at rogers.com
Thu Nov 2 21:27:01 EST 2006


On Thu, 2006-02-11 at 16:53 -0500, Chris Shoemaker wrote:
> On Thu, Nov 02, 2006 at 08:47:30AM -0500, Phil Longstaff wrote:
> > I have started working on a gda backend and am starting with a QofQuery
> > -> SQL translator.  
> 
> Have you looked at just directly using the GdaQuery objects?  You can
> constuct an abstract query out of GdaQueryFieldFields,
> GdaQueryFieldValues and such.  Then, libgda will emit the
> provider-specific SQL for that query.

I hadn't yet.  I had an older version of libgda which didn't have
GdaQuery.  I've downloaded the latest version and am looking at it.

> To be frank, IMO, GdaQuery is a better data model for queries than
> QofQuery.  By "better", I mean "more appropriate for GnuCash".  I
> think it's very unfortunate that GnuCash uses its own home-grown
> object-agnostic query representation.  Someone else will probably
> disagree.

They do seem to have similar functionality.  It would be interesting if
GdaQuery were used and the current file backend acted like an in-memory
DBMS.

> But, if you re-parented GnuCash's engine objects with a
> GnuCash-sepcific GncObject (even with GValue parameters, maybe), and
> implemented the QofQuery functionality by generating a GdaQuery, you
> would be my hero.  But that's probably more work than you were hoping
> for.  *sigh*
> 
> Anyway, try to avoid writing the SQL emitter, if you can.

I don't really want to gut the core of GC and rebuild it around Gda.

Phil



More information about the gnucash-devel mailing list