Github user kaspersorensen commented on the pull request:

    https://github.com/apache/metamodel/pull/14#issuecomment-90161694
  
    Thanks for the patch, but I don't think this approach will fly. First I 
have to mention that there are code styling issues (tabs instead of spaces, no 
spaces in front of parenthesis etc.) but that's less important right now ...
    
    Important part is: Different databases have different SQL dialects and in 
this patch it is proposed to switch from one dialect (that was very common but 
less flexible) to the other dialect which is AFAIK less supported.
    
    Here's some sources of inspiration maybe:
    
    [1] http://www.w3schools.com/sql/sql_primarykey.asp
    [2] http://www.techonthenet.com/sql/primary_keys.php
    
    To make this work we should only touch the JdbcCreateTableBuilder IMO. The 
abstract one is not supposed/guaranteed to generate perfect SQL for all 
databases, just like Query.toSql() will not generate SQL that is working on all 
databases. It is in the concrete implementation of CreateTableBuilder that we 
figure that part out (and in non-JDBC modules it is not a CREATE TABLE 
statement but some other operation anyway).
    
    The JdbcCreateTableBuilder should take advice or delegate to the 
QueryRewriter interface. This is our current mechanism to allow different 
databases to have different dialects. I suggest we continue with that approach 
unless there's some better idea.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to