I think limited application of aliases would be beneficial but query
substitutions would work in many situations. The current date issue I am not
sure that it is one of them. I am guilty of having not tried
hibernate.query.substitutions on this level. I am not sure you can use this
to deal with the wide variances in current date syntax.
Oracle = sysdate               (No brackets).
DB2 = current date           (No Brackets, and a space [real pain for a
parser])
HSQL= current_date()
Postgress= now()

How about alias  today()?

Not sure what other "common" items would require aliases, the rest use
substitutions, direct dialect and pass through. Ideas?

In anycase, supporting two parsers will be necessary across actively
supported versions.
We talked a little about a Version 3 where package names get changed to
org.hibernate and other items changed as well but the fear/issue was
breaking to much existing code. Don't want to do this lightly. Is this step
with the new parser and possible changes to the supported syntax a Version 3
option?

--David.

----- Original Message ----- 
From: "Gavin King" <[EMAIL PROTECTED]>
To: "Joshua Davis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 12:01 AM
Subject: Re: [Hibernate] Re: AST parser for HQL


> I don't think we are realistically going to be able to dream up portable
> aliases for everything. I can see an argument for doing it for a couple
> of very important cases like current date. Beyond that I wouldn't really
> like to go there. Note that you can't have both really ... as soon as
> you have too many aliases, they start to clobber the namespace of
> proprietary and user-defined functions.
>
> Note also that the user can define portable aliases for themselves in
> the current parser, by specifying hibernate.query.substitutions.
>
> Joshua Davis wrote:
>
> > David,
> >
> > Excelent point. It looks like a design decision is required here (i.e.
> > portable aliases vs. proprietary pass-through).  Personally, I like the
idea
> > of portable aliases for special features, as I'm not sure how I'm going
to
> > plug Hibernate's dialect information into the parser.  It's probably not
to
> > hard to do that though, if someone would be kind enough to point me at
the
> > right part of the Hibernate API.  :)
> >
> >
> > Josh
>
>
>
> -------------------------------------------------------
> This SF. Net email is sponsored by: GoToMyPC
> GoToMyPC is the fast, easy and secure way to access your computer from
> any Web browser or wireless device. Click here to Try it Free!
> https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to