I implemented this in r14901. Enjoy. Christian Stimming <[EMAIL PROTECTED]> writes:
> Derek, > > by the way, this "enhancement request" to the QOF API is still valid. I'd > love > if a subquery on a qof query were implemented, because then I'd subsequently > be able to speed up the generic importer (hopefully) quite a lot. > > Is it possible for you sometime in the future to implement what you've > outlined? Thanks a lot in advance. > > Christian > > Am Sonntag, 6. August 2006 16:20 schrieb Derek Atkins: >> No, there's no way to take the results of a query and run a subquery on it. >> HOWEVER, I think adding that functionality might be pretty easy. We could >> add something like: >> >> GList* qof_query_run_subquery(QofQuery* subq, QofQuery* q); >> >> Note that running qof_query_run() on the same query multiple times will >> re-iterate over the full book, but you can use qof_query_last_run() >> to just return the last set. >> >> I think adding this new API would be relatively simple. >> What you've provided below will still iterate multiple times. Using >> this new API you'd do something like: >> >> ... >> [ setup query ] >> ... >> (void)qof_query_run(stored_query); >> ... >> loop { >> ... >> [ setup subquery ] >> results = qof_query_run_subquery(subq, stored_q); >> ... >> } >> >> -derek >> >> Quoting Christian Stimming <[EMAIL PROTECTED]>: >> > Just a question about the qofquery.h interface: Is it possible to refine >> > a query multiple times? > > -- 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 [EMAIL PROTECTED] PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel