What I meant was that the HQL parser would transform the HQL tree to the longer form before passing off to the HQL/SQL walker. I didn't mean anything about the user visible syntax. Actually, I succeeded in implementing this, but I never committed it, it doesn't really look like we will need it now.

However, since you touch on this, I *did* make a decision to no longer support elements() and indices() etc, functions in the select clause, since that had very non-intuitive semantics, and was just generally a Bad Thing. (elements() meant something completely different in the select clause to what it meant in the where clause)

dchannon wrote:

Hi,
Just a general comment.
+1 on being able to get HQL to parse and process the longer versions but
-1 on removing older syntax. I like the short versions and would rather they were kept since I consider them to be convenient rather than redundant. I guess im use to them. In addition, its also a characteristic that makes HQL ...well HQL.
Side note: I tend to prefer 'left fetch join' which is supported by the old parser. Whats the chance to allow the new parser to accept it? I am prepared to add it myself but it might just be me that has this syntax preference.
Cheers David.


    -----Original Message-----
    *From:* [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] *On Behalf Of
    *Gavin King
    *Sent:* Friday, 25 February 2005 11:22 PM
    *To:* 'hibernate-devel@lists.sourceforge.net'
    *Subject:* [Hibernate] New query parser

    Guys, I’d like to slightly change how the new parser handles a
    couple of exotic (redundant) constructs. Basically, what I want,
    is that the first phase of parsing produces a HQL AST with a much
    simpler canonical form, with less Kinds of Things. So, for example:

        * “elements(foo.collection)” would be replaced with “(from
          foo.collection)”
        * “indices (foo.collection)” would be replaced with “(select
          index(x) from foo.collection x)”

    So far, so good, I already managed to implement this in hql.g, it
    was straightforward. But I also want:

        * “from Foo foo where foo.map[key] = ‘blah’” to be transformed
          to “from Foo foo join foo.map x where index(x) = ‘blah’

    And now I gotta problem. Trouble is that it seems quite difficult
    to stick new join clauses onto the from clause, when we discover
    stuff further down the tree.

    Can this even be done?

--
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com


-- Gavin King +61 410 534 454 +1 404 822 8349 callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com



--
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to