I really do think we need to set the HQL name (since it is our syntax)
rather than use raw or what ever as a prefix. Common functions should have a
common name in HQL so the dialects provide a high degree of portability. The
function can never be a simple pass through in the select clause as HQL
engine will always need to know the type of the returned value. Now in some
cases this type result may have involved type conversions depending on the
term(s) used. Pass through is no problem for the where clause.

--David.



----- Original Message ----- 
From: "Chris Nokleberg" <[EMAIL PROTECTED]>
To: "Joshua Davis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 18, 2003 6:13 AM
Subject: Re: [Hibernate] Re: AST parser for HQL


> On Mon, Nov 17, 2003 at 11:54:54AM -0800, Joshua Davis wrote:
> > That's a neat idea.  So, 'raw:' would be a
> > pass-through that would pass things directly to the
> > underlying engine.  The only issue there is when the
> > underlying syntax does not obey the rules of the
> > over-arching grammar (e.g. 'current date', there is no
> > ident ident rule).  This means the parser cannot
> > recognize the construct, and therefore it cannot be
> > passed through.  For this type of situation, you would
> > need to have some quoting syntax to get the parser to
> > treat the construct as a string.  Don't know if you
> > guys want to go that far though.
>
> I suppose you could do something like
>   raw "current date"
>
> So 'raw' becomes a keyword that modifies the next token.
>
> But the goal, I think, should be to eliminate the need for raw as much
> as possible, so "now()" would be much preferrable for this particular
> example.
>
> > For driver-specific functions you could potentially have a prefix that
> > indicates it should flow through into the resulting xml
>
> Of course I meant SQL, not xml :-)
>
> Chris
>
>
> -------------------------------------------------------
> 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