Re: Parenthesis in queries.

From: Daniel Lorimer (thelorime..mail.com)
Date: Thu Jul 07 2005 - 09:12:28 EDT

  • Next message: laila paganelli: "Re: SelectQuery and table that is synonym"

    Yes.

    That makes sense. It helps me understand the difference.

    Thank you,
    Daniel Lorimer

    On 7/7/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >
    > > I don't really understand the difference between SelectQueries and
    > > SQLTemplateQueries (as far as how they handle syntax)
    >
    > Yes, there is a difference. SQLTemplate is an unparsable "black box"
    > to Cayenne, while SelectQuery is not (see below).
    >
    >
    > > it seems that if I could get the same expression into the
    > > SelectQuery, that it would work fine. Is this true, or is there
    > > some formatting thing in the SelectQuery that would throw it off.
    >
    > Cayenne expressions have dual functionality - they can be applied to
    > object graphs in-memory, and they can also be translated to SQL WHERE
    > clause by Cayenne. The scope of what expressions can and can not do
    > is formally defined by this syntax - http://objectstyle.org/cayenne/
    > grammar/ExpressionParser.html
    >
    > This means that each element in the expression string has to mean
    > something to Cayenne. Unlike SQLTemplate, Expression is not a "black
    > box". It has to be parseable into something that Cayenne understands.
    > So this is not a matter of parenthesis per se (parenthesis are
    > supported for grouping), the problem is that with this you introduce
    > a new element - functions - that are not currently a part of the
    > official syntax.
    >
    > I hope this makes sense.
    >
    > Andrus
    >
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jul 07 2005 - 09:12:28 EDT