I read somewhere that v2.2 will include an interface to the HQL parser. I am interested in whether this will allow me to use db specific functions by customising the dialects. Functions like isnull, dateadd etc from SQLServer.
For example dateadd().
In SQLServer:
dateadd( getdate(), dd, 5 ) // add 5 days
Oracle
sysdate + interval '5' day
MySQL
now() + interval 5 day
So would it be possible to define my own pseudo function ( say dateadd() )like SQLServer and write a plugin that will convert dateadd( x, y, z ) to the relevant syntax depending on the dialect, or alternatively write a new dialect for each db to do this?
Is this what the parser will be able to do or is there some other way of achieving the above, either now or in 2.2 with the new parser?
Any information or suggestions would be appreciated as would a rough guess as to when 2.2 might be available.
I have looked at the JDBC functions ( TIMESTAMPADD ) but no Oracle JDBC driver seems to support it.
Cheers.
|