Class HANALegacyDialect

java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.community.dialect.HANALegacyDialect
All Implemented Interfaces:
org.hibernate.boot.model.FunctionContributor, org.hibernate.boot.model.TypeContributor, org.hibernate.exception.spi.ConversionContext

public class HANALegacyDialect extends org.hibernate.dialect.Dialect
An SQL dialect for legacy versions of the SAP HANA Platform up tu and including 2.0 SPS 04.

For more information on SAP HANA Platform, refer to the SAP HANA Platform SQL Reference Guide.

Column tables are created by this dialect by default when using the auto-ddl feature.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces declared in class org.hibernate.dialect.Dialect

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields declared in class org.hibernate.dialect.Dialect

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

    Constructors
    Constructor
    Description
     
    HANALegacyDialect(org.hibernate.dialect.DatabaseVersion version)
     
    HANALegacyDialect(org.hibernate.dialect.DatabaseVersion version, boolean defaultTableTypeColumn)
     
    HANALegacyDialect(org.hibernate.dialect.HANAServerConfiguration configuration, boolean defaultTableTypeColumn)
     
    HANALegacyDialect(org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo info)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hibernate.engine.jdbc.env.spi.IdentifierHelper
    buildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata)
     
    extractPattern(org.hibernate.query.common.TemporalUnit unit)
    HANA has no extract() function, but we can emulate it using the appropriate named functions instead of extract().
     
    org.hibernate.dialect.temptable.TemporaryTableStrategy
     
    protected int
    HANA doesn't support the generate_series function or lateral recursive CTEs, so it has to be emulated with the xmltable and lpad functions.
    getReadLockString(int timeout)
     
    getReadLockString(String aliases, int timeout)
     
    org.hibernate.dialect.temptable.TemporaryTableKind
     
     
     
     
    getWriteLockString(String aliases, int timeout)
     
    protected boolean
     
    protected boolean
     
    boolean
     
    protected boolean
     
    boolean
    HANA currently does not support check constraints.
    protected Boolean
     

    Methods declared in class org.hibernate.dialect.Dialect

    addPartitionKeyToPrimaryKey, addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendCheckConstraintOptions, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, causesRollback, checkVersion, closeQuote, columnType, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getColumnDefaultString, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getCurrentTimestampSelectString, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getDual, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getFromDualForSelectOnly, getFunctionalDependencyAnalysisSupport, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIdentityColumnSupport, getIndexExporter, getInExpressionCountLimit, getInformationExtractor, getKeywords, getLimitHandler, getLobMergeStrategy, getLocalTemporaryTableStrategy, getLockingClauseStrategy, getLockingStrategy, getLockingStrategy, getLockingSupport, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxTimestampPrecision, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMaxVarcharLength, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSetOperatorSqlString, getSizeStrategy, getSqlAstTranslatorFactory, getSqmTranslatorFactory, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporalTableSupport, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeExporter, getValueLOBFragmentForExtraCreateTableInfo, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, isCurrentTimestampSelectStringCallable, isCurrentTimestampStable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, narrowCastType, openQuote, ordinal, prependComment, qualifyIndexName, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresNotNullBeforeDefault, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, roundsToMaxPrecisionFirst, rowId, rowIdSqlType, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsCteHeaderColumnList, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExceptAll, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeIndexName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNamedParameters, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullAfterGeneratedAs, supportsNoWait, supportsNullPrecedence, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPartitionBy, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUniqueConstraints, supportsUpdateReturning, supportsUserDefinedTypes, supportsValueLOBAccess, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClause, supportsWithClauseInSubquery, throttleDdl, timestampaddPattern, timestampdiffPattern, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • HANALegacyDialect

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

      public HANALegacyDialect()
    • HANALegacyDialect

      public HANALegacyDialect(org.hibernate.dialect.DatabaseVersion version)
    • HANALegacyDialect

      public HANALegacyDialect(org.hibernate.dialect.DatabaseVersion version, boolean defaultTableTypeColumn)
    • HANALegacyDialect

      public HANALegacyDialect(org.hibernate.dialect.HANAServerConfiguration configuration, boolean defaultTableTypeColumn)
  • Method Details

    • isDefaultTableTypeColumn

      protected boolean isDefaultTableTypeColumn()
    • isCloud

      protected boolean isCloud()
    • getMaximumSeriesSize

      protected int getMaximumSeriesSize()
      HANA doesn't support the generate_series function or lateral recursive CTEs, so it has to be emulated with the xmltable and lpad functions.
    • extractPattern

      public String extractPattern(org.hibernate.query.common.TemporalUnit unit)
      HANA has no extract() function, but we can emulate it using the appropriate named functions instead of extract(). The supported fields are TemporalUnit.YEAR, TemporalUnit.MONTH TemporalUnit.DAY, TemporalUnit.HOUR, TemporalUnit.MINUTE, TemporalUnit.SECOND TemporalUnit.WEEK, TemporalUnit.DAY_OF_WEEK, TemporalUnit.DAY_OF_MONTH, TemporalUnit.DAY_OF_YEAR.
      Overrides:
      extractPattern in class org.hibernate.dialect.Dialect
    • supportsColumnCheck

      public boolean supportsColumnCheck()
      HANA currently does not support check constraints.
      Overrides:
      supportsColumnCheck in class org.hibernate.dialect.Dialect
    • buildIdentifierHelper

      public org.hibernate.engine.jdbc.env.spi.IdentifierHelper buildIdentifierHelper(org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder builder, DatabaseMetaData metadata) throws SQLException
      Overrides:
      buildIdentifierHelper in class org.hibernate.dialect.Dialect
      Throws:
      SQLException
    • getCurrentSchemaCommand

      public String getCurrentSchemaCommand()
      Overrides:
      getCurrentSchemaCommand in class org.hibernate.dialect.Dialect
    • getReadLockString

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

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

      public String getWriteLockString(String aliases, int timeout)
      Overrides:
      getWriteLockString in class org.hibernate.dialect.Dialect
    • isUseUnicodeStringTypes

      public boolean isUseUnicodeStringTypes()
    • supportsAsciiStringTypes

      protected boolean supportsAsciiStringTypes()
    • useUnicodeStringTypesDefault

      protected Boolean useUnicodeStringTypesDefault()
    • getSupportedTemporaryTableKind

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

      public org.hibernate.dialect.temptable.TemporaryTableStrategy getGlobalTemporaryTableStrategy()
      Overrides:
      getGlobalTemporaryTableStrategy in class org.hibernate.dialect.Dialect
    • getTemporaryTableCreateOptions

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

      public String getTemporaryTableCreateCommand()
      Overrides:
      getTemporaryTableCreateCommand in class org.hibernate.dialect.Dialect
    • getTemporaryTableTruncateCommand

      public String getTemporaryTableTruncateCommand()
      Overrides:
      getTemporaryTableTruncateCommand in class org.hibernate.dialect.Dialect