Interface DatabaseType
- All Superinterfaces:
ReservedKeywordsAware
- All Known Implementing Classes:
AbstractDatabaseType,AbstractPostgresDatabaseType,DB2DatabaseType,H2DatabaseType,Hsql233DatabaseType,HsqlDatabaseType,MsSqlDatabaseType,MySqlDatabaseType,Oracle10GDatabaseType,Postgres73DatabaseType,PostgresDatabaseType,SapDB76DatabaseType,SapDBDatabaseType,SimpleDatabaseType
Interface representing the different types of databases. If you implement this interface,
you should register your implementation with DatabaseTypeFactory.
-
Field Summary
FieldsFields inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
END_ESCAPE_CHARACTER_SQUARE_BRACKET, ESCAPE_CHARACTER_BACK_TICK, ESCAPE_CHARACTER_DOUBLE_QUOTE, START_ESCAPE_CHARACTER_SQUARE_BRACKET -
Method Summary
Modifier and TypeMethodDescriptiongetChangeColumnTypeSQL(String tableName, String columnName, String targetSqlType) Builds a DB-specific SQL statement to update a column's type.intgetDropIndexSQL(String schemaName, String tableName, String indexName) Builds a DB-specific SQL statement for dropping index.getName()getSchemaName(Connection con) Returns the name of the connected schema.default StringgetSimpleSelectSqlSyntax(boolean clusterMode) Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.initialize(Connection con) booleanMethods inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
enableEscaping, escapeColumnName, getEndEscapeCharacter, getReservedKeywords, getStartEscapeCharacter
-
Field Details
-
STANDARD_SELECT_SYNTAX
- See Also:
-
-
Method Details
-
getName
String getName() -
getFieldTypeName
String getFieldTypeName() -
getSchemaName
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
- Throws:
SQLException
-
getChangeColumnTypeSQL
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
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
Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage. -
initialize
-