public class Teradata14Dialect extends TeradataDialect
A dialect for the Teradata database
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 |
|---|
Teradata14Dialect() |
| Modifier and Type | Method and Description |
|---|---|
String |
applyLocksToSql(String sql,
LockOptions aliasedLockOptions,
Map keyColumnNames)
Modifies the given SQL by applying the appropriate updates for the specified
lock modes and key columns.
|
boolean |
areStringComparisonsCaseInsensitive()
Are string comparisons implicitly case insensitive.
|
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
IdentityColumnSupport |
getIdentityColumnSupport()
Get the appropriate
IdentityColumnSupport |
Exporter<Index> |
getIndexExporter() |
String |
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect.
|
ResultSet |
getResultSet(CallableStatement cs)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
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.
|
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter() |
String |
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet by position. |
boolean |
supportsExistsInSelect()
Does the dialect support an exists statement in the select clause?
|
boolean |
supportsExpectedLobUsagePattern()
Expected LOB usage pattern is such that I can perform an insert
via prepared statement with a parameter binding for a LOB value
without crazy casting to JDBC driver implementation-specific classes…
<p/>
Part of the trickiness here is the fact that this is largely
driver dependent.
|
boolean |
supportsLockTimeouts()
Informational metadata about whether this dialect is known to support
specifying timeouts for requested lock acquisitions.
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support
count(distinct a,b)? |
boolean |
supportsUnboundedLobLocatorMaterialization()
Is it supported to materialize a LOB locator outside the transaction in
which it was created?
<p/>
Again, part of the trickiness here is the fact that this is largely
driver dependent.
|
boolean |
useFollowOnLocking(QueryParameters parameters)
Some dialects have trouble applying pessimistic locking depending upon what other query options are
specified (paging, ordering, etc).
|
doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, generateIdTableName, getCreateIdTableCommand, getCreateIdTableStatementOptions, getCreateMultisetTableString, getDefaultMultiTableBulkIdStrategy, getDropIdTableCommand, getForUpdateString, getInExpressionCountLimit, getSelectClauseNullString, getTruncateIdTableCommand, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsEmptyInList, supportsLobValueChangePropogation, supportsSequencesaddSqlHintOrComment, appendLockHint, appendLockHint, 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, getKeywords, getLimitHandler, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNotExpression, getNullColumnString, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsCaseInsensitiveLike, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimit, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimitpublic String getAddColumnString()
DialectThe syntax used to add a column to a table (optional).
getAddColumnString in class TeradataDialectpublic 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.
getTypeName in class TeradataDialectcode - <tt>java.sql.Types</tt> typecodelength - the length or precision of the columnprecision - the precision of the columnscale - the scale of the columnHibernateExceptionpublic boolean areStringComparisonsCaseInsensitive()
DialectAre string comparisons implicitly case insensitive. <p/> In other words, does [where 'XYZ' = 'xyz'] resolve to true?
areStringComparisonsCaseInsensitive in class TeradataDialectpublic boolean supportsExpectedLobUsagePattern()
DialectExpected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes… <p/> Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers…
supportsExpectedLobUsagePattern in class Dialectpublic ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter in interface ConversionContextgetViolatedConstraintNameExtracter in class Dialectpublic boolean supportsTupleDistinctCounts()
DialectDoes this dialect support count(distinct a,b)?
supportsTupleDistinctCounts in class Dialectpublic boolean supportsExistsInSelect()
DialectDoes the dialect support an exists statement in the select clause?
supportsExistsInSelect in class Dialectpublic boolean supportsUnboundedLobLocatorMaterialization()
DialectIs it supported to materialize a LOB locator outside the transaction in
which it was created?
<p/>
Again, part of the trickiness here is the fact that this is largely
driver dependent.
<p/>
NOTE: all database I have tested which Dialect.supportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction…
supportsUnboundedLobLocatorMaterialization in class Dialectpublic int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
DialectRegisters a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning ResultSet by position. Pre-Java 8, registering such ResultSet-returning
parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.
registerResultSetOutParameter in class Dialectstatement - The callable statement.col - The bind position at which to register the output param.SQLException - Indicates problems registering the param.public ResultSet getResultSet(CallableStatement cs) throws SQLException
DialectGiven a callable statement previously processed by Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.
getResultSet in class Dialectcs - The callable statement.SQLException - Indicates problems extracting the result set.public String getWriteLockString(int timeout)
DialectGet the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
getWriteLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(int timeout)
DialectGet the string to append to SELECT statements to acquire READ locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.
getReadLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames)
DialectModifies the given SQL by applying the appropriate updates for the specified lock modes and key columns. <p/> The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This method is really intended to allow dialects which do not support <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion.
applyLocksToSql in class Dialectsql - the SQL string to modifyaliasedLockOptions - lock options indexed by aliased table names.keyColumnNames - a map of key columns indexed by aliased table names.public boolean useFollowOnLocking(QueryParameters parameters)
DialectSome dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc). This method allows these dialects to request that locking be applied by subsequent selects.
useFollowOnLocking in class Dialectparameters - query parameterstrue indicates that the dialect requests that locking be applied by subsequent select;
false (the default) indicates that locking should be applied to the main SQL statement..public boolean supportsLockTimeouts()
DialectInformational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.
supportsLockTimeouts in class Dialectpublic Exporter<Index> getIndexExporter()
getIndexExporter in class Dialectpublic IdentityColumnSupport getIdentityColumnSupport()
DialectGet the appropriate IdentityColumnSupport
getIdentityColumnSupport in class DialectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.