Package org.hibernate.dialect
Class TeradataDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.TeradataDialect
A dialect for the Teradata database created by MCR as part of the
dialect certification process.
-
Field Summary
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre string comparisons implicitly case insensitive.booleanFor the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?booleanFor the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?booleanDo we need to drop the temporary table after use?The syntax used to add a column to a table (optional).Slight variation onDialect.getCreateTableString().Get any fragments needing to be postfixed to the command for temporary table creation.Command used to create a temporary table.Does this dialect support the FOR UPDATE syntax?getSelectClauseNullString(int sqlType) Given aTypestype code, determine an appropriate null value to use in a select clause.getTypeName(int code, int length, int precision, int scale) Get the name of the database type associated with the given java.sql.Types typecode.Does the dialect require that temporary table DDL statements occur in isolation from other statements? This would be the case if the creation would cause any current transaction to get committed implicitly.booleanDoes this dialect support using a JDBC bind parameter as an argument to a function or procedure call?booleanbooleanDoes this dialect support definition of cascade delete constraints which can cause circular chains?booleanDoes this dialect support empty IN lists?booleanDoes this dialect support identity column key generation?booleanDoes the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance...booleanDoes this dialect support sequences?booleanDoes this dialect support temporary tables?Methods inherited from class org.hibernate.dialect.Dialect
addTypeOverride, appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, dropConstraints, forceLimitUsage, forUpdateOfColumns, generateTemporaryTableName, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getDropTemporaryTableString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLimitString, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getQuerySequencesString, getReadLockString, getResultSet, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeOverrides, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, isLockTimeoutParameterized, openQuote, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimit, supportsLimitOffset, supportsLockTimeouts, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob, useMaxForLimit
-
Constructor Details
-
TeradataDialect
public TeradataDialect()Constructor
-
-
Method Details
-
getForUpdateString
Does this dialect support the FOR UPDATE syntax?- Overrides:
getForUpdateStringin classDialect- Returns:
- empty string ... Teradata does not support FOR UPDATE syntax
-
supportsIdentityColumns
public boolean supportsIdentityColumns()Description copied from class:DialectDoes this dialect support identity column key generation?- Overrides:
supportsIdentityColumnsin classDialect- Returns:
- True if IDENTITY columns are supported; false otherwise.
-
supportsSequences
public boolean supportsSequences()Description copied from class:DialectDoes this dialect support sequences?- Overrides:
supportsSequencesin classDialect- Returns:
- True if sequences supported; false otherwise.
-
getAddColumnString
Description copied from class:DialectThe syntax used to add a column to a table (optional).- Overrides:
getAddColumnStringin classDialect- Returns:
- The "add column" fragment.
-
supportsTemporaryTables
public boolean supportsTemporaryTables()Description copied from class:DialectDoes this dialect support temporary tables?- Overrides:
supportsTemporaryTablesin classDialect- Returns:
- True if temp tables are supported; false otherwise.
-
getCreateTemporaryTableString
Description copied from class:DialectCommand used to create a temporary table.- Overrides:
getCreateTemporaryTableStringin classDialect- Returns:
- The command used to create a temporary table.
-
getCreateTemporaryTablePostfix
Description copied from class:DialectGet any fragments needing to be postfixed to the command for temporary table creation.- Overrides:
getCreateTemporaryTablePostfixin classDialect- Returns:
- Any required postfix.
-
performTemporaryTableDDLInIsolation
Description copied from class:DialectDoes the dialect require that temporary table DDL statements occur in isolation from other statements? This would be the case if the creation would cause any current transaction to get committed implicitly. JDBC defines a standard way to query for this information via theDatabaseMetaData.dataDefinitionCausesTransactionCommit()method. However, that does not distinguish between temporary table DDL and other forms of DDL; MySQL, for example, reports DDL causing a transaction commit via its driver, even though that is not the case for temporary table DDL. Possible return values and their meanings:Boolean.TRUE- Unequivocally, perform the temporary table DDL in isolation.Boolean.FALSE- Unequivocally, do not perform the temporary table DDL in isolation.- null - defer to the JDBC driver response in regards to
DatabaseMetaData.dataDefinitionCausesTransactionCommit()
- Overrides:
performTemporaryTableDDLInIsolationin classDialect- Returns:
- see the result matrix above.
-
dropTemporaryTableAfterUse
public boolean dropTemporaryTableAfterUse()Description copied from class:DialectDo we need to drop the temporary table after use?- Overrides:
dropTemporaryTableAfterUsein classDialect- Returns:
- True if the table should be dropped.
-
getTypeName
Get the name of the database type associated with the given java.sql.Types typecode.- Overrides:
getTypeNamein classDialect- Parameters:
code- java.sql.Types typecodelength- the length or precision of the columnprecision- the precision of the columnscale- the scale of the column- Returns:
- the database type name
- Throws:
HibernateException
-
supportsCascadeDelete
public boolean supportsCascadeDelete()- Overrides:
supportsCascadeDeletein classDialect
-
supportsCircularCascadeDeleteConstraints
public boolean supportsCircularCascadeDeleteConstraints()Description copied from class:DialectDoes this dialect support definition of cascade delete constraints which can cause circular chains?- Overrides:
supportsCircularCascadeDeleteConstraintsin classDialect- Returns:
- True if circular cascade delete constraints are supported; false otherwise.
-
areStringComparisonsCaseInsensitive
public boolean areStringComparisonsCaseInsensitive()Description copied from class:DialectAre string comparisons implicitly case insensitive. In other words, does [where 'XYZ' = 'xyz'] resolve to true?- Overrides:
areStringComparisonsCaseInsensitivein classDialect- Returns:
- True if comparisons are case insensitive.
-
supportsEmptyInList
public boolean supportsEmptyInList()Description copied from class:DialectDoes this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?- Overrides:
supportsEmptyInListin classDialect- Returns:
- True if empty in lists are supported; false otherwise.
-
getSelectClauseNullString
Description copied from class:DialectGiven aTypestype code, determine an appropriate null value to use in a select clause. One thing to consider here is that certain databases might require proper casting for the nulls here since the select here will be part of a UNION/UNION ALL.- Overrides:
getSelectClauseNullStringin classDialect- Parameters:
sqlType- TheTypestype code.- Returns:
- The appropriate select clause value fragment.
-
getCreateMultisetTableString
Description copied from class:DialectSlight variation onDialect.getCreateTableString(). Here, we have the command used to create a table when there is no primary key and duplicate rows are expected. Most databases do not care about the distinction; originally added for Teradata support which does care.- Overrides:
getCreateMultisetTableStringin classDialect- Returns:
- The command used to create a multiset table.
-
supportsLobValueChangePropogation
public boolean supportsLobValueChangePropogation()Description copied from class:DialectDoes the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance... For BLOBs, the internal value might be changed by:Blob.setBinaryStream(long),Blob.setBytes(long, byte[]),Blob.setBytes(long, byte[], int, int), orBlob.truncate(long). For CLOBs, the internal value might be changed by:Clob.setAsciiStream(long),Clob.setCharacterStream(long),Clob.setString(long, String),Clob.setString(long, String, int, int), orClob.truncate(long). NOTE : I do not know the correct answer currently for databases which (1) are not part of the cruise control process or (2) do notDialect.supportsExpectedLobUsagePattern().- Overrides:
supportsLobValueChangePropogationin classDialect- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
doesReadCommittedCauseWritersToBlockReaders
public boolean doesReadCommittedCauseWritersToBlockReaders()Description copied from class:DialectFor the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?- Overrides:
doesReadCommittedCauseWritersToBlockReadersin classDialect- Returns:
- True if writers block readers to achieve READ_COMMITTED; false otherwise.
-
doesRepeatableReadCauseReadersToBlockWriters
public boolean doesRepeatableReadCauseReadersToBlockWriters()Description copied from class:DialectFor the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?- Overrides:
doesRepeatableReadCauseReadersToBlockWritersin classDialect- Returns:
- True if readers block writers to achieve REPEATABLE_READ; false otherwise.
-
supportsBindAsCallableArgument
public boolean supportsBindAsCallableArgument()Description copied from class:DialectDoes this dialect support using a JDBC bind parameter as an argument to a function or procedure call?- Overrides:
supportsBindAsCallableArgumentin classDialect- Returns:
- True if the database supports accepting bind params as args; false otherwise.
-