public class TeradataDialect extends Dialect implements IdTableSupport
A dialect for the Teradata database created by MCR as part of the dialect certification process.
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
Constructor and Description |
---|
TeradataDialect()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
areStringComparisonsCaseInsensitive()
Are string comparisons implicitly case insensitive.
|
boolean |
doesReadCommittedCauseWritersToBlockReaders()
For the underlying database, is READ_COMMITTED isolation implemented by
forcing readers to wait for write locks to be released?
|
boolean |
doesRepeatableReadCauseReadersToBlockWriters()
For the underlying database, is REPEATABLE_READ isolation implemented by
forcing writers to wait for read locks to be released?
|
String |
generateIdTableName(String baseName) |
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
String |
getCreateIdTableCommand() |
String |
getCreateIdTableStatementOptions() |
String |
getCreateMultisetTableString()
Slight variation on
Dialect.getCreateTableString() . |
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getDropIdTableCommand() |
String |
getForUpdateString()
Does this dialect support the <tt>FOR UPDATE</tt> syntax?
|
int |
getInExpressionCountLimit()
Return the limit that the underlying database places on the number of elements in an
IN predicate. |
String |
getSelectClauseNullString(int sqlType)
Given a
Types type code, determine an appropriate
null value to use in a select clause. |
String |
getTruncateIdTableCommand() |
String |
getTypeName(int code,
int length,
int precision,
int scale)
Get the name of the database type associated with the given
<tt>java.sql.Types</tt> typecode.
|
boolean |
supportsBindAsCallableArgument()
Does this dialect support using a JDBC bind parameter as an argument
to a function or procedure call?
|
boolean |
supportsCascadeDelete()
Does this dialect support cascaded delete on foreign key definitions?
|
boolean |
supportsCircularCascadeDeleteConstraints()
Does this dialect support definition of cascade delete constraints
which can cause circular chains?
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
<p/>
For example, is [where XYZ in ()] a supported construct?
|
boolean |
supportsLobValueChangePropogation()
Does 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…
<p/>
For BLOBs, the internal value might be changed by:
Blob.setBinaryStream(long) ,
Blob.setBytes(long, byte[]) ,
Blob.setBytes(long, byte[], int, int) ,
or Blob.truncate(long) . |
boolean |
supportsSequences()
Does this dialect support sequences?
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, dropConstraints, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnSupport, getIndexExporter, getKeywords, getLimitHandler, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNotExpression, getNullColumnString, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsCaseInsensitiveLike, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimit, supportsLimitOffset, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
public String getForUpdateString()
Does this dialect support the <tt>FOR UPDATE</tt> syntax?
getForUpdateString
in class Dialect
public boolean supportsSequences()
Dialect
Does this dialect support sequences?
supportsSequences
in class Dialect
public String getAddColumnString()
Dialect
The syntax used to add a column to a table (optional).
getAddColumnString
in class Dialect
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy
in class Dialect
public String generateIdTableName(String baseName)
generateIdTableName
in interface IdTableSupport
public String getCreateIdTableCommand()
getCreateIdTableCommand
in interface IdTableSupport
public String getCreateIdTableStatementOptions()
getCreateIdTableStatementOptions
in interface IdTableSupport
public String getDropIdTableCommand()
getDropIdTableCommand
in interface IdTableSupport
public String getTruncateIdTableCommand()
getTruncateIdTableCommand
in interface IdTableSupport
public String getTypeName(int code, int length, int precision, int scale) throws HibernateException
Get the name of the database type associated with the given <tt>java.sql.Types</tt> typecode.
code
- <tt>java.sql.Types</tt> typecodelength
- the length or precision of the columnprecision
- the precision of the columnscale
- the scale of the columnHibernateException
public boolean supportsCascadeDelete()
Dialect
Does this dialect support cascaded delete on foreign key definitions?
supportsCascadeDelete
in class Dialect
true
indicates that the dialect does support cascaded delete on foreign keys.public boolean supportsCircularCascadeDeleteConstraints()
Dialect
Does this dialect support definition of cascade delete constraints which can cause circular chains?
supportsCircularCascadeDeleteConstraints
in class Dialect
public boolean areStringComparisonsCaseInsensitive()
Dialect
Are string comparisons implicitly case insensitive. <p/> In other words, does [where 'XYZ' = 'xyz'] resolve to true?
areStringComparisonsCaseInsensitive
in class Dialect
public boolean supportsEmptyInList()
Dialect
Does this dialect support empty IN lists? <p/> For example, is [where XYZ in ()] a supported construct?
supportsEmptyInList
in class Dialect
public String getSelectClauseNullString(int sqlType)
Dialect
Given a Types
type code, determine an appropriate
null value to use in a select clause.
<p/>
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.
getSelectClauseNullString
in class Dialect
sqlType
- The Types
type code.public String getCreateMultisetTableString()
Dialect
Slight variation on Dialect.getCreateTableString()
. Here, we have the
command used to create a table when there is no primary key and
duplicate rows are expected.
<p/>
Most databases do not care about the distinction; originally added for
Teradata support which does care.
getCreateMultisetTableString
in class Dialect
public boolean supportsLobValueChangePropogation()
Dialect
Does 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…
<p/>
For BLOBs, the internal value might be changed by:
Blob.setBinaryStream(long)
,
Blob.setBytes(long, byte[])
,
Blob.setBytes(long, byte[], int, int)
,
or Blob.truncate(long)
.
<p/>
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)
,
or Clob.truncate(long)
.
<p/>
NOTE : I do not know the correct answer currently for
databases which (1) are not part of the cruise control process
or (2) do not Dialect.supportsExpectedLobUsagePattern()
.
supportsLobValueChangePropogation
in class Dialect
public boolean doesReadCommittedCauseWritersToBlockReaders()
Dialect
For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
doesReadCommittedCauseWritersToBlockReaders
in class Dialect
public boolean doesRepeatableReadCauseReadersToBlockWriters()
Dialect
For the underlying database, is REPEATABLE_READ isolation implemented by forcing writers to wait for read locks to be released?
doesRepeatableReadCauseReadersToBlockWriters
in class Dialect
public boolean supportsBindAsCallableArgument()
Dialect
Does this dialect support using a JDBC bind parameter as an argument to a function or procedure call?
supportsBindAsCallableArgument
in class Dialect
true
if the database supports accepting bind params as args, false
otherwise. The
default is true
.public int getInExpressionCountLimit()
Dialect
Return the limit that the underlying database places on the number of elements in an IN
predicate.
If the database defines no such limits, simply return zero or less-than-zero.
getInExpressionCountLimit
in class Dialect
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.