CVS update: gnucash/src/engine

Derek Atkins warlord at MIT.EDU
Thu Jun 12 12:04:49 CDT 2003


linas at linas.org (Linas Vepstas) writes:

> On Tue, Jun 10, 2003 at 04:56:39PM -0400, Derek Atkins was heard to remark:
> > ooh.. cool.
> 
> account group, pricedb and currency table now use gncObject ...
> 
> >         split -> account -> group :: is_subgroup_of(xxx)".
> > 
> > But this requires adding a new query predicate type, which I'd like to
> > avoid if possible.  OTOH, it would be useful for "open account and all
> 
> Smells like 'relational' to me.   I think the predicates you need to
> add are "has_a" and "is_a", but I'm not an expert .. I vaguely remember 
> "uses_a", "child_of" and "parent_of" ... and some arguments about what 
> the correct primitve predicates should really be. 

Well, currently my predicates are based on type-comparrisons, and each
QueryCore type has its own predicates.  For example a string predicate
has a two predicates, "matches" and "doesn't match".  Then there are two
additional predicate flags: "match-case-insensitive" and "match-regex".

There is not a generic "equals" predicate..  It's based on a data
type.  So, as I said, I could build an "AccountGroup" predicate type,
but it would be much better if I could base it on the existing "GUID"
match....  However the GUID match requires you to match against a list
of GUIDs.  I'd have to think about how to possibly extend this to
provide parental searches.

> > Ideas?
> 
> as usual, I'm very short on time.  I'm pretty much done splitting out
> the function I need; its currently checked into/mirrored at the 
> gnotime cvs at /lib/gnc .. I'm planning on writing a few example
> programs that use QueryNew.   I've also filed a sourceforge site
> for 'qof' query object framework that essentially forks this code,
> but my goal is to keep the code perfectly in sync and use the
> sourceforge site to attract additional developers to maintin this stuff.

For someone short on time you've certainly been making lots of changes
to the Engine ;)

> --linas

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list