[hibernate-dev] HHH-2403 - import.sql improvement

Łukasz Antoniak lukasz.antoniak at gmail.com
Sun Nov 6 07:57:12 EST 2011


Welcome!

Last time I have been trying to improve the way that Hibernate extracts 
statements from "import.sql" script. My intention was to support 
multiline SQL instructions (HHH-2403), quoted strings, multiline 
comments etc. After developing quite simple ANTLR-based parser, I have 
realized that right now semicolons are not mandatory (at the end of each 
SQL statement). If there is no separator character (e.g. ';') between 
statements, the only possibility to resolve HHH-2403 is to apply a full 
SQL parser. But supporting all different dialects would be quite 
difficult... Is it acceptable to change the code, so that each statement 
must be ended with a semicolon (branch 4.0)?

You can see my work here: 
https://github.com/lukasz-antoniak/hibernate-core/commit/c11b881a8975502fa7b754391d10e789eaa101e6

Regards,
Lukasz Antoniak



More information about the hibernate-dev mailing list