[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4732) Update Teradata Dialect for Teradata 13.0

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Nov 3 11:42:48 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38994#action_38994 ] 

Steve Ebersole commented on HHH-4732:
-------------------------------------

1) I'd really prefer all "instanceof" checks for Dialects in the testsuite use methods on the Dialect instead.  Why are these tests being skipped for Terradata anyway?

2) For this FK dropping code I am not liking the approach.  Why can't Configuration (used from SchemaExport) just say:
{code}
public String[] generateDropSchemaScript(Dialect dialect) throws HibernateException {
    ...
    if ( fk.isPhysicalConstraint() ) {
        script.add( fk.sqlDropString( dialect, defaultCatalog, defaultSchema ) );
        if ( dialect.hasForeignKeyPostDropProcess() ) {
            script.add( dialect.generateForeignKeyPostDropSql( fk... ) );
        }
    }
    ...
}
{code}
I cannot imagine this is a general problem that needs a general solution across all types of relational objects across all dialects.

> Update Teradata Dialect for Teradata 13.0
> -----------------------------------------
>
>                 Key: HHH-4732
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4732
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.2
>         Environment: Hibernate 3.3.2/ Teradata JDBC Driver 13.0, Teradata Database 13.0
>            Reporter: David Repshas
>            Assignee: Strong Liu
>         Attachments: teradata.zip, teradataDiff.zip, testsuiteMods.zip
>
>
> Would like to update Teradata Dialect to work with Teradata Database 13.0.
> I've include the following files with changes as noted:
> org.hibernate.dialect.dialect.java
> - added include of java.sql.statement
> - added code to support the removal of temporary
>   files created when using referential integrity
>   The three new methods are:
> 	public boolean supportsDropPreProcess() 
>         public String performDropPreProcess(Statement stmt, String dropSql) throws SQLException
>         public void performDropPostProcess(Statement stmt, String dropSql) throws SQLException 
> ==================================
> org.hibernate.dialect.TeradataDialect.java
> - added new include files
> - modified registerFunction calls for "current_time" and "current_date"
> - put registerKeyword list in alphabetical order and added keywords:
>     column,map,password,summary, type, value and year
> - changed "getAddColumnString()" to return "Add"
> - added new methods:
>    public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
>    public String extractConstraintName(SQLException sqlex) 
>    public boolean supportsNotNullUnique()
>    public boolean supportsExpectedLobUsagePattern()
>    public boolean supportsUnboundedLobLocatorMaterialization() 
>    public boolean supportsDropPreProcess() 
>    public String performDropPreProcess(Statement stmt, String dropSql) throws SQLException
>    public void performDropPostProcess(Statement stmt, String dropSql) throws SQLException 
>    
> ==================================
> org.hibernate.tool.hbm2ddl.SchemaExport
> - added hooks for new methods:
> 	supportsDropPreProcess,performDropPreProcess and performDropPostProcess 
> ==================================
> Also made some changes to some of the files in testsuite:
> =============================================
> test/hql/astParserLoadingTest.java
>    - Add instance check of TeradataDialect to get correct behavior
> =============================================
> test/legacy/foobartest.java
>  - Add instance check of TeradataDialect to get correct behavior
>  - modified SQL: Teradata requires "<>" rather than "!="
>   
> =============================================
> test/typeParameters\typeparametertest.java
>  -needed to disable these tests as Teradata locking was causing 
> a deadlock situation when they run
> =============================================

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list