Re: Following links in QB
Jukka Zitting <[email protected]>
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I asked:
> group?
Ah sorry, I was thinking about GROUP BY instead of parentheses. :-)
Rambo already answered the group issue. A related question is whether
the following should be supported:
$qb = new MidgardQueryBuilder("midgard_article");
$qb->begin_group("OR");
$qb->add_constraint("name", "=", "foo");
$subqb = $qb->forward_join("author");
$subqb->add_constraint("username", "=", "bar");
$qb->end_group();
$qb->execute(); // Returns articles named "foo" or authored by "bar"
At first I think we could support only top-level joins but I see no
problem in supporting grouped joins later on when the QB internals are
strong enough to support something like that.
BR,
Jukka Zitting