is it possible to "refine" an existing QofQuery multiple times?
Christian Stimming
stimming at tuhh.de
Tue Sep 26 15:27:00 EDT 2006
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 <stimming at tuhh.de>:
> > Just a question about the qofquery.h interface: Is it possible to refine
> > a query multiple times?
More information about the gnucash-devel
mailing list