GC, QOF and queries
Chris Shoemaker
c.shoemaker at cox.net
Thu Nov 2 16:53:28 EST 2006
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.
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.
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.
-chris
More information about the gnucash-devel
mailing list