Class TeradataDialect

  • All Implemented Interfaces:
    org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext
    Direct Known Subclasses:
    Teradata14Dialect

    public class TeradataDialect
    extends org.hibernate.dialect.Dialect
    A dialect for the Teradata database created by MCR as part of the dialect certification process.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect

        org.hibernate.dialect.Dialect.SizeStrategy, org.hibernate.dialect.Dialect.SizeStrategyImpl
    • Field Summary

      • Fields inherited from class org.hibernate.dialect.Dialect

        CLOSED_QUOTE, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
    • Constructor Summary

      Constructors 
      Constructor Description
      TeradataDialect()  
      TeradataDialect​(org.hibernate.dialect.DatabaseVersion version)  
      TeradataDialect​(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String applyLocksToSql​(String sql, org.hibernate.LockOptions aliasedLockOptions, Map<String,​String[]> keyColumnNames)  
      protected String columnType​(int sqlTypeCode)  
      boolean doesReadCommittedCauseWritersToBlockReaders()  
      boolean doesRepeatableReadCauseReadersToBlockWriters()  
      String getAddColumnString()  
      String getCreateMultisetTableString()  
      int getDefaultDecimalPrecision()  
      int getDefaultStatementBatchSize()  
      org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy​(org.hibernate.metamodel.mapping.EntityMappingType rootEntityDescriptor, org.hibernate.metamodel.spi.RuntimeModelCreationContext runtimeModelCreationContext)  
      org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy​(org.hibernate.metamodel.mapping.EntityMappingType rootEntityDescriptor, org.hibernate.metamodel.spi.RuntimeModelCreationContext runtimeModelCreationContext)  
      String getForUpdateString()
      Does this dialect support the FOR UPDATE syntax?
      long getFractionalSecondPrecisionInNanos()  
      org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()  
      org.hibernate.tool.schema.spi.Exporter<org.hibernate.mapping.Index> getIndexExporter()  
      int getInExpressionCountLimit()  
      org.hibernate.dialect.pagination.LimitHandler getLimitHandler()  
      int getMaxAliasLength()  
      int getMaxIdentifierLength()  
      int getMaxVarbinaryLength()  
      int getMaxVarcharLength()  
      int getPreferredSqlTypeCodeForBoolean()  
      String getReadLockString​(int timeout)  
      ResultSet getResultSet​(CallableStatement cs)  
      String getSelectClauseNullString​(int sqlType, org.hibernate.type.spi.TypeConfiguration typeConfiguration)  
      org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()  
      org.hibernate.dialect.temptable.TemporaryTableKind getSupportedTemporaryTableKind()  
      String getTemporaryTableCreateOptions()  
      org.hibernate.exception.spi.ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()  
      String getWriteLockString​(int timeout)  
      void initializeFunctionRegistry​(org.hibernate.boot.model.FunctionContributions functionContributions)  
      protected void registerDefaultKeywords()  
      int registerResultSetOutParameter​(CallableStatement statement, int col)  
      org.hibernate.type.descriptor.jdbc.JdbcType resolveSqlTypeDescriptor​(String columnTypeName, int jdbcTypeCode, int precision, int scale, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)  
      boolean supportsBindAsCallableArgument()  
      boolean supportsCascadeDelete()  
      boolean supportsCircularCascadeDeleteConstraints()  
      boolean supportsExistsInSelect()  
      boolean supportsLobValueChangePropagation()  
      boolean supportsLockTimeouts()  
      boolean supportsNoWait()  
      boolean supportsOrderByInSubquery()  
      boolean supportsTupleDistinctCounts()  
      boolean supportsUnboundedLobLocatorMaterialization()  
      boolean supportsWait()  
      boolean supportsWindowFunctions()  
      String timestampaddPattern​(org.hibernate.query.sqm.TemporalUnit unit, TemporalType temporalType, org.hibernate.query.sqm.IntervalType intervalType)  
      String timestampdiffPattern​(org.hibernate.query.sqm.TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)  
      boolean useFollowOnLocking​(String sql, org.hibernate.query.spi.QueryOptions queryOptions)  
      boolean useInputStreamToInsertBlob()  
      • Methods inherited from class org.hibernate.dialect.Dialect

        addSqlHintOrComment, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, checkVersion, closeQuote, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, dropConstraints, equivalentTypes, escapeComment, extractPattern, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCurrentSchemaCommand, getCurrentTimestampSelectString, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGenerationType, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getSqmTranslatorFactory, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isCurrentTimestampSelectStringCallable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, openQuote, ordinal, prependComment, qualifyIndexName, quote, registerColumnTypes, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeLength, rowId, rowIdSqlType, supportsAlterColumnType, supportsBitType, supportsCaseInsensitiveLike, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsJdbcConnectionLobCreation, supportsLateral, supportsMaterializedLobAccess, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNullPrecedence, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPredicateAsExpression, supportsRecursiveCTE, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useArrayForMultiValuedParameters, useMaterializedLobWhenCapacityExceeded
    • Constructor Detail

      • TeradataDialect

        public TeradataDialect​(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
      • TeradataDialect

        public TeradataDialect()
      • TeradataDialect

        public TeradataDialect​(org.hibernate.dialect.DatabaseVersion version)
    • Method Detail

      • registerDefaultKeywords

        protected void registerDefaultKeywords()
        Overrides:
        registerDefaultKeywords in class org.hibernate.dialect.Dialect
      • columnType

        protected String columnType​(int sqlTypeCode)
        Overrides:
        columnType in class org.hibernate.dialect.Dialect
      • getDefaultStatementBatchSize

        public int getDefaultStatementBatchSize()
        Overrides:
        getDefaultStatementBatchSize in class org.hibernate.dialect.Dialect
      • useInputStreamToInsertBlob

        public boolean useInputStreamToInsertBlob()
        Overrides:
        useInputStreamToInsertBlob in class org.hibernate.dialect.Dialect
      • getMaxVarcharLength

        public int getMaxVarcharLength()
        Overrides:
        getMaxVarcharLength in class org.hibernate.dialect.Dialect
      • getMaxVarbinaryLength

        public int getMaxVarbinaryLength()
        Overrides:
        getMaxVarbinaryLength in class org.hibernate.dialect.Dialect
      • resolveSqlTypeDescriptor

        public org.hibernate.type.descriptor.jdbc.JdbcType resolveSqlTypeDescriptor​(String columnTypeName,
                                                                                    int jdbcTypeCode,
                                                                                    int precision,
                                                                                    int scale,
                                                                                    org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry jdbcTypeRegistry)
        Overrides:
        resolveSqlTypeDescriptor in class org.hibernate.dialect.Dialect
      • getSqlAstTranslatorFactory

        public org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory()
        Overrides:
        getSqlAstTranslatorFactory in class org.hibernate.dialect.Dialect
      • getPreferredSqlTypeCodeForBoolean

        public int getPreferredSqlTypeCodeForBoolean()
        Overrides:
        getPreferredSqlTypeCodeForBoolean in class org.hibernate.dialect.Dialect
      • getDefaultDecimalPrecision

        public int getDefaultDecimalPrecision()
        Overrides:
        getDefaultDecimalPrecision in class org.hibernate.dialect.Dialect
      • getFractionalSecondPrecisionInNanos

        public long getFractionalSecondPrecisionInNanos()
        Overrides:
        getFractionalSecondPrecisionInNanos in class org.hibernate.dialect.Dialect
      • timestampdiffPattern

        public String timestampdiffPattern​(org.hibernate.query.sqm.TemporalUnit unit,
                                           TemporalType fromTemporalType,
                                           TemporalType toTemporalType)
        Overrides:
        timestampdiffPattern in class org.hibernate.dialect.Dialect
      • timestampaddPattern

        public String timestampaddPattern​(org.hibernate.query.sqm.TemporalUnit unit,
                                          TemporalType temporalType,
                                          org.hibernate.query.sqm.IntervalType intervalType)
        Overrides:
        timestampaddPattern in class org.hibernate.dialect.Dialect
      • initializeFunctionRegistry

        public void initializeFunctionRegistry​(org.hibernate.boot.model.FunctionContributions functionContributions)
        Overrides:
        initializeFunctionRegistry in class org.hibernate.dialect.Dialect
      • getForUpdateString

        public String getForUpdateString()
        Does this dialect support the FOR UPDATE syntax?
        Overrides:
        getForUpdateString in class org.hibernate.dialect.Dialect
        Returns:
        empty string ... Teradata does not support FOR UPDATE syntax
      • getAddColumnString

        public String getAddColumnString()
        Overrides:
        getAddColumnString in class org.hibernate.dialect.Dialect
      • getFallbackSqmMutationStrategy

        public org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy​(org.hibernate.metamodel.mapping.EntityMappingType rootEntityDescriptor,
                                                                                                                 org.hibernate.metamodel.spi.RuntimeModelCreationContext runtimeModelCreationContext)
        Overrides:
        getFallbackSqmMutationStrategy in class org.hibernate.dialect.Dialect
      • getFallbackSqmInsertStrategy

        public org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy​(org.hibernate.metamodel.mapping.EntityMappingType rootEntityDescriptor,
                                                                                                             org.hibernate.metamodel.spi.RuntimeModelCreationContext runtimeModelCreationContext)
        Overrides:
        getFallbackSqmInsertStrategy in class org.hibernate.dialect.Dialect
      • getSupportedTemporaryTableKind

        public org.hibernate.dialect.temptable.TemporaryTableKind getSupportedTemporaryTableKind()
        Overrides:
        getSupportedTemporaryTableKind in class org.hibernate.dialect.Dialect
      • getTemporaryTableCreateOptions

        public String getTemporaryTableCreateOptions()
        Overrides:
        getTemporaryTableCreateOptions in class org.hibernate.dialect.Dialect
      • getMaxAliasLength

        public int getMaxAliasLength()
        Overrides:
        getMaxAliasLength in class org.hibernate.dialect.Dialect
      • getMaxIdentifierLength

        public int getMaxIdentifierLength()
        Overrides:
        getMaxIdentifierLength in class org.hibernate.dialect.Dialect
      • supportsCascadeDelete

        public boolean supportsCascadeDelete()
        Overrides:
        supportsCascadeDelete in class org.hibernate.dialect.Dialect
      • supportsCircularCascadeDeleteConstraints

        public boolean supportsCircularCascadeDeleteConstraints()
        Overrides:
        supportsCircularCascadeDeleteConstraints in class org.hibernate.dialect.Dialect
      • supportsTupleDistinctCounts

        public boolean supportsTupleDistinctCounts()
        Overrides:
        supportsTupleDistinctCounts in class org.hibernate.dialect.Dialect
      • supportsExistsInSelect

        public boolean supportsExistsInSelect()
        Overrides:
        supportsExistsInSelect in class org.hibernate.dialect.Dialect
      • supportsOrderByInSubquery

        public boolean supportsOrderByInSubquery()
        Overrides:
        supportsOrderByInSubquery in class org.hibernate.dialect.Dialect
      • supportsWindowFunctions

        public boolean supportsWindowFunctions()
        Overrides:
        supportsWindowFunctions in class org.hibernate.dialect.Dialect
      • getSelectClauseNullString

        public String getSelectClauseNullString​(int sqlType,
                                                org.hibernate.type.spi.TypeConfiguration typeConfiguration)
        Overrides:
        getSelectClauseNullString in class org.hibernate.dialect.Dialect
      • supportsUnboundedLobLocatorMaterialization

        public boolean supportsUnboundedLobLocatorMaterialization()
        Overrides:
        supportsUnboundedLobLocatorMaterialization in class org.hibernate.dialect.Dialect
      • getCreateMultisetTableString

        public String getCreateMultisetTableString()
        Overrides:
        getCreateMultisetTableString in class org.hibernate.dialect.Dialect
      • supportsLobValueChangePropagation

        public boolean supportsLobValueChangePropagation()
        Overrides:
        supportsLobValueChangePropagation in class org.hibernate.dialect.Dialect
      • doesReadCommittedCauseWritersToBlockReaders

        public boolean doesReadCommittedCauseWritersToBlockReaders()
        Overrides:
        doesReadCommittedCauseWritersToBlockReaders in class org.hibernate.dialect.Dialect
      • doesRepeatableReadCauseReadersToBlockWriters

        public boolean doesRepeatableReadCauseReadersToBlockWriters()
        Overrides:
        doesRepeatableReadCauseReadersToBlockWriters in class org.hibernate.dialect.Dialect
      • supportsBindAsCallableArgument

        public boolean supportsBindAsCallableArgument()
        Overrides:
        supportsBindAsCallableArgument in class org.hibernate.dialect.Dialect
      • getInExpressionCountLimit

        public int getInExpressionCountLimit()
        Overrides:
        getInExpressionCountLimit in class org.hibernate.dialect.Dialect
      • registerResultSetOutParameter

        public int registerResultSetOutParameter​(CallableStatement statement,
                                                 int col)
                                          throws SQLException
        Overrides:
        registerResultSetOutParameter in class org.hibernate.dialect.Dialect
        Throws:
        SQLException
      • getViolatedConstraintNameExtractor

        public org.hibernate.exception.spi.ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
        Specified by:
        getViolatedConstraintNameExtractor in interface org.hibernate.exception.spi.ConversionContext
        Overrides:
        getViolatedConstraintNameExtractor in class org.hibernate.dialect.Dialect
      • supportsLockTimeouts

        public boolean supportsLockTimeouts()
        Overrides:
        supportsLockTimeouts in class org.hibernate.dialect.Dialect
      • supportsNoWait

        public boolean supportsNoWait()
        Overrides:
        supportsNoWait in class org.hibernate.dialect.Dialect
      • supportsWait

        public boolean supportsWait()
        Overrides:
        supportsWait in class org.hibernate.dialect.Dialect
      • useFollowOnLocking

        public boolean useFollowOnLocking​(String sql,
                                          org.hibernate.query.spi.QueryOptions queryOptions)
        Overrides:
        useFollowOnLocking in class org.hibernate.dialect.Dialect
      • getWriteLockString

        public String getWriteLockString​(int timeout)
        Overrides:
        getWriteLockString in class org.hibernate.dialect.Dialect
      • getReadLockString

        public String getReadLockString​(int timeout)
        Overrides:
        getReadLockString in class org.hibernate.dialect.Dialect
      • getIndexExporter

        public org.hibernate.tool.schema.spi.Exporter<org.hibernate.mapping.Index> getIndexExporter()
        Overrides:
        getIndexExporter in class org.hibernate.dialect.Dialect
      • getIdentityColumnSupport

        public org.hibernate.dialect.identity.IdentityColumnSupport getIdentityColumnSupport()
        Overrides:
        getIdentityColumnSupport in class org.hibernate.dialect.Dialect
      • applyLocksToSql

        public String applyLocksToSql​(String sql,
                                      org.hibernate.LockOptions aliasedLockOptions,
                                      Map<String,​String[]> keyColumnNames)
        Overrides:
        applyLocksToSql in class org.hibernate.dialect.Dialect
      • getLimitHandler

        public org.hibernate.dialect.pagination.LimitHandler getLimitHandler()
        Overrides:
        getLimitHandler in class org.hibernate.dialect.Dialect