Joshua Davis wrote:
Gavin,
Thanks for reviewing the code, and I'm glad to help.
Max Andersen also had a look and he thinks its excellent.
I should be able to start working on an SQL producing examples in the next few days. I will take a look at net.sf.hibernate.persister.Queryable, and start a 'tree walker' grammar to round out a typical ANLR source translator in the typical 'three phase' ANTLR fasion (lexer->parser->tree parser).
Fantastic. Its great to have someone with experience doing this.
Here are some questions I had:
* Can this be done by just invoking the methods in the Hibernate JAR for now, or do I need to build Hibernate? Either way, which version of the Hibernate API should I use?
* How do I: - Load and read Hibernate configurations? - Read information about 'dialects'? - Invoke SQL generating APIs?
I suggest we use a mock Queryable, so that we can test this stuff w/o Hibernate. Its good TDD approach, I think.
* Should I add SQL-99 functions to the grammar?
Aaahhhh I think we should worry about that a bit later on, personally. Lets get the basics right first. We can evolve the grammar easily enough, right?
Others have mentioned adding SQL-99 functions to the grammar and using them to portably translate into the proper dialect. Since some of the SQL-99 functions have their own (IMHO, weird and unnecessary) syntax, they must be added to the grammar. For example: concatentate : "CONCATENATE" '(' expression ( '||' expression )* ')'
Yeah this is silly. I think we should just support "foo || bar", like most databases.
count(distinct foo) is also a wierd one.
-- Gavin King JBoss Group +61 410534454 http://hibernate.org
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel