Question: How to build complicated queries?

Derek Atkins warlord@MIT.EDU
03 Feb 2002 12:18:06 -0500

I've been reading the query documentation but I don't
understand how one is supposed to use the existing APIs
to build a "complicated" query.

For example, I want a query to be:

        a && (b || (c && d))

How would one use the QUERY_AND, QUERY_OR, etc. methods and
xaccQueryAddTerm() API to build a query of this logic? 

I guess my question is: what's the API to specify the "order of
logical operations", or how does one specify parens in a logical


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