Interface DatabaseType

All Superinterfaces:
ReservedKeywordsAware
All Known Implementing Classes:
AbstractDatabaseType, AbstractPostgresDatabaseType, DB2DatabaseType, H2DatabaseType, Hsql233DatabaseType, HsqlDatabaseType, MsSqlDatabaseType, MySqlDatabaseType, Oracle10GDatabaseType, Postgres73DatabaseType, PostgresDatabaseType, SapDB76DatabaseType, SapDBDatabaseType, SimpleDatabaseType

public interface DatabaseType extends ReservedKeywordsAware
Interface representing the different types of databases. If you implement this interface, you should register your implementation with DatabaseTypeFactory.
See Also:
  • Field Details

  • Method Details

    • getName

      String getName()
    • getFieldTypeName

      String getFieldTypeName()
    • getSchemaName

      String getSchemaName(Connection con)
      Returns the name of the connected schema.
      Parameters:
      con - the connection for which to return the schema
      Returns:
      null if a schema name is not available
    • getConstraintNameClipLength

      int getConstraintNameClipLength()
    • matchesConnection

      boolean matchesConnection(Connection con) throws SQLException
      Throws:
      SQLException
    • getChangeColumnTypeSQL

      String getChangeColumnTypeSQL(String tableName, String columnName, String targetSqlType)
      Builds a DB-specific SQL statement to update a column's type.
      Parameters:
      tableName - the name of the table to be changed.
      columnName - the name of the column to be changed.
      targetSqlType - the target SQL type of the column.
      Returns:
      the SQL text to change the column, or null, if not supported.
    • getDropIndexSQL

      String getDropIndexSQL(String schemaName, String tableName, String indexName)
      Builds a DB-specific SQL statement for dropping index.
      Parameters:
      schemaName - the of the schema containing table.
      tableName - the name of the table to be changed.
      indexName - the name of the index to be dropped.
      Returns:
      the SQL text to drop the index.
    • getSimpleSelectSqlSyntax

      default String getSimpleSelectSqlSyntax(boolean clusterMode)
      Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.
    • initialize

      DatabaseType initialize(Connection con)