[dna-issues] [JBoss JIRA] Created: (DNA-641) The DDL sequencer should allow specifying the dialect type in DDL comments
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Sat Jan 9 14:47:37 EST 2010
The DDL sequencer should allow specifying the dialect type in DDL comments
--------------------------------------------------------------------------
Key: DNA-641
URL: https://jira.jboss.org/jira/browse/DNA-641
Project: DNA
Issue Type: Feature Request
Components: Sequencers
Affects Versions: 0.7
Reporter: Randall Hauch
Fix For: 1.0
At the moment, the DdlParsers class looks for a leading "PARSER_ID = <DialectName>" at the beginning of the DDL stream. If this is not found, then the class attempts to automatically discover the dialect by performing a best fit. Unfortunately, the "PARSER_ID = <DialectName>" is not valid DDL, and thus can never be included in a real DDL file.
Rather than look for this kind of leading statement, the DdlParsers should look for the first comment block and simply attempt to find the dialect names in the comment text. This should be done in a case-insensitive way, and would ideally count the number of occurrences of each dialect name (thus handling the case where an Oracle DDL file contained both "oracle" and "postgres" in the comment; hopefully the "oracle" term would appear more than others). This of course is very imprecise, but it is perhaps only 'better than' the use of non-DDL statements.
It is also desirable that the DdlParsers class should be tolerant of incorrectly typing the DDL stream. For example, lets say a DDL file contains a comment containing "oracle" and no other dialect name, but this DDL file is actually for PostgreSQL and merely contains the word "oracle" because it was converted from another Oracle DDL file. In this case, if parsing with the PostgreSQL parser results in an error, the DdlParsers should start over, behaving as though the dialect typing was incorrect, and should perform a "best fit".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list