On Mon, Nov 17, 2003 at 01:05:50PM -0500, Les A. Hazlewood wrote: > > How about we get a list of ANSI-standard SQL functions and portably > > support those and those only (I don't think there are many of them). > > This makes a lot of sense. However, what if something so commonly used (like a > current_timestamp() function) is not part of the ANSI standard (assuming ANSI > SQL-92)? Would you make exceptions for that? [snip] > Thinking out loud here, but for aliases for commonly used SQL functions/tokens, > wouldn't it be good to define them as part of the dialect via an internal lookup > table? These HQL standard aliases could also be prefixed with a hql identifier > to make it easy to signify when substitution should occur (and would be used as > the key in the Dialect's lookup table).
I would rather you go the other way, i.e. unprefixed functions should be portable ANSI-derived aliases which are mapped by the dialects to the necessary names. For driver-specific functions you could potentially have a prefix that indicates it should flow through into the resulting xml, e.g. raw:some_oracle_function(). But hopefully the aliases will cover 99% and you can use normal SQL for the rest. For things like now() that are not standardized but exist in the majority of implementations I would just pick the name you like best and go with it. HQL becoming usable and portable across dialects is much more important to me than compatibilty with some SQL spec that no one obeys anyway. 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