Package org.hibernate.dialect
Class Teradata14Dialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.TeradataDialect
-
- org.hibernate.dialect.Teradata14Dialect
-
- All Implemented Interfaces:
ConversionContext,IdTableSupport
public class Teradata14Dialect extends TeradataDialect
A dialect for the Teradata database
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.Dialect
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, TWO_SINGLE_QUOTES_REPLACEMENT
-
-
Constructor Summary
Constructors Constructor Description Teradata14Dialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapplyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames)Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.booleanareStringComparisonsCaseInsensitive()Are string comparisons implicitly case insensitive.StringgetAddColumnString()The syntax used to add a column to a table (optional).IdentityColumnSupportgetIdentityColumnSupport()Get the appropriateIdentityColumnSupportExporter<Index>getIndexExporter()StringgetReadLockString(int timeout)Get the string to append to SELECT statements to acquire READ locks for this dialect.ResultSetgetResultSet(CallableStatement cs)Given a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int), extract theResultSetfrom the OUT parameter.StringgetTypeName(int code, int length, int precision, int scale)Get the name of the database type associated with the given java.sql.Types typecode.ViolatedConstraintNameExtractergetViolatedConstraintNameExtracter()StringgetWriteLockString(int timeout)Get the string to append to SELECT statements to acquire WRITE locks for this dialect.intregisterResultSetOutParameter(CallableStatement statement, int col)Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet*by position*.booleansupportsExistsInSelect()Does the dialect support an exists statement in the select clause?booleansupportsExpectedLobUsagePattern()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...booleansupportsLockTimeouts()Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.booleansupportsTupleDistinctCounts()Does this dialect support `count(distinct a,b)`?booleansupportsUnboundedLobLocatorMaterialization()Is it supported to materialize a LOB locator outside the transaction in which it was created?booleanuseFollowOnLocking(QueryParameters parameters)Some dialects have trouble applying pessimistic locking depending upon what other query options are specified (paging, ordering, etc).-
Methods inherited from class org.hibernate.dialect.TeradataDialect
doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, generateIdTableName, getCreateIdTableCommand, getCreateIdTableStatementOptions, getCreateMultisetTableString, getDefaultMultiTableBulkIdStrategy, getDropIdTableCommand, getForUpdateString, getInExpressionCountLimit, getSelectClauseNullString, getTruncateIdTableCommand, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsEmptyInList, supportsLobValueChangePropogation, supportsSequences
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, augmentPhysicalTableTypes, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, dropConstraints, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, 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, supportsJdbcConnectionLobCreation, supportsLimit, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
-
-
-
-
Method Detail
-
getAddColumnString
public String getAddColumnString()
Description copied from class:DialectThe syntax used to add a column to a table (optional).- Overrides:
getAddColumnStringin classTeradataDialect- Returns:
- The "add column" fragment.
-
getTypeName
public String getTypeName(int code, int length, int precision, int scale) throws HibernateException
Get the name of the database type associated with the given java.sql.Types typecode.- Overrides:
getTypeNamein classTeradataDialect- 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
-
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 classTeradataDialect- Returns:
- True if comparisons are case insensitive.
-
supportsExpectedLobUsagePattern
public boolean supportsExpectedLobUsagePattern()
Description copied from class: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... 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...- Overrides:
supportsExpectedLobUsagePatternin classDialect- Returns:
- True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
-
getViolatedConstraintNameExtracter
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
- Specified by:
getViolatedConstraintNameExtracterin interfaceConversionContext- Overrides:
getViolatedConstraintNameExtracterin classDialect
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()
Description copied from class:DialectDoes this dialect support `count(distinct a,b)`?- Overrides:
supportsTupleDistinctCountsin classDialect- Returns:
- True if the database supports counting distinct tuples; false otherwise.
-
supportsExistsInSelect
public boolean supportsExistsInSelect()
Description copied from class:DialectDoes the dialect support an exists statement in the select clause?- Overrides:
supportsExistsInSelectin classDialect- Returns:
- True if exists checks are allowed in the select clause; false otherwise.
-
supportsUnboundedLobLocatorMaterialization
public boolean supportsUnboundedLobLocatorMaterialization()
Description copied from class:DialectIs it supported to materialize a LOB locator outside the transaction in which it was created? Again, part of the trickiness here is the fact that this is largely driver dependent. NOTE: all database I have tested whichDialect.supportsExpectedLobUsagePattern()also support the ability to materialize a LOB outside the owning transaction...- Overrides:
supportsUnboundedLobLocatorMaterializationin classDialect- Returns:
- True if unbounded materialization is supported; false otherwise.
-
registerResultSetOutParameter
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
Description copied from class:DialectRegisters a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet*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.- Overrides:
registerResultSetOutParameterin classDialect- Parameters:
statement- The callable statement.col- The bind position at which to register the output param.- Returns:
- The number of (contiguous) bind positions used.
- Throws:
SQLException- Indicates problems registering the param.
-
getResultSet
public ResultSet getResultSet(CallableStatement cs) throws SQLException
Description copied from class:DialectGiven a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int), extract theResultSetfrom the OUT parameter.- Overrides:
getResultSetin classDialect- Parameters:
cs- The callable statement.- Returns:
- The extracted result set.
- Throws:
SQLException- Indicates problems extracting the result set.
-
getWriteLockString
public String getWriteLockString(int timeout)
Description copied from class:DialectGet the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.- Overrides:
getWriteLockStringin classDialect- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getReadLockString
public String getReadLockString(int timeout)
Description copied from class:DialectGet the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockStringin classDialect- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
applyLocksToSql
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames)
Description copied from class:DialectModifies the given SQL by applying the appropriate updates for the specified lock modes and key columns. The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.- Overrides:
applyLocksToSqlin classDialect- Parameters:
sql- the SQL string to modifyaliasedLockOptions- lock options indexed by aliased table names.keyColumnNames- a map of key columns indexed by aliased table names.- Returns:
- the modified SQL string.
-
useFollowOnLocking
public boolean useFollowOnLocking(QueryParameters parameters)
Description copied from class: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.- Overrides:
useFollowOnLockingin classDialect- Parameters:
parameters- query parameters- Returns:
trueindicates 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..
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
Description copied from class:DialectInformational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.- Overrides:
supportsLockTimeoutsin classDialect- Returns:
- True is this dialect supports specifying lock timeouts.
-
getIndexExporter
public Exporter<Index> getIndexExporter()
- Overrides:
getIndexExporterin classDialect
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:DialectGet the appropriateIdentityColumnSupport- Overrides:
getIdentityColumnSupportin classDialect- Returns:
- the IdentityColumnSupport
-
-