Top Description Constructors Methods
org.hibernate.dialect

public Class HANAColumnStoreDialect

extends AbstractHANADialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.HANACloudColumnStoreDialect
Imports
org.hibernate.boot.model.FunctionContributions, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.query.sqm.mutation.internal.temptable.GlobalTemporaryTableInsertStrategy, .GlobalTemporaryTableMutationStrategy, org.hibernate.dialect.temptable.TemporaryTable, .TemporaryTableKind, org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy, .SqmMultiTableMutationStrategy, org.hibernate.type.StandardBasicTypes, org.hibernate.type.spi.TypeConfiguration

An SQL dialect for the SAP HANA column store.

For more information on interacting with the SAP HANA database, refer to the SAP HANA SQL and System Views Reference and the SAP HANA Client Interface Programming Reference.

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

Authors
Andrew Clemons, Jonathan Bregler

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public String
getCreateTableString()

Overrides org.hibernate.dialect.Dialect.getCreateTableString.

The command used to create a table, usually create table.
public SqmMultiTableInsertStrategy
public SqmMultiTableMutationStrategy
public int
getMaxVarcharLength()

Overrides org.hibernate.dialect.AbstractHANADialect.getMaxVarcharLength.

The biggest size value that can be supplied as argument to a java.sql.Types#VARCHAR-like type.
public TemporaryTableKind
getSupportedTemporaryTableKind()

Overrides org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

The kind of temporary tables that are supported on this database.
public String
public String
getTemporaryTableCreateOptions()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableCreateOptions.

An arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, or null if there are no options to specify.
public String
public void
initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.AbstractHANADialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.
public boolean
protected void
registerDefaultKeywords()

Overrides org.hibernate.dialect.AbstractHANADialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.
protected boolean
protected Boolean
Inherited from org.hibernate.dialect.AbstractHANADialect:
appendBooleanValueStringappendDatetimeFormatappendDateTimeLiteralappendDateTimeLiteralbuildIdentifierHelperbuildSQLExceptionConversionDelegatecastPatterncolumnTypecontributeTypescreateVersiondefaultScrollModedropConstraintsextractPatterngeneratedAsgetAddColumnStringgetAddColumnSuffixStringgetBlobTypeDescriptorgetCallableStatementSupportgetCascadeConstraintsStringgetColumnCommentgetCurrentSchemaCommandgetCurrentTimestampSelectStringgetDefaultDecimalPrecisiongetDefaultNonContextualLobCreationgetDefaultUseGetGeneratedKeysgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetForUpdateStringgetFractionalSecondPrecisionInNanosgetIdentityColumnSupportgetLimitHandlergetMaxAliasLengthgetMaxIdentifierLengthgetMaxNVarcharLengthgetMaxVarbinaryLengthgetNameQualifierSupportgetNullOrderinggetQueryHintStringgetQuerySequencesStringgetReadLockStringgetReadLockStringgetSelectGUIDStringgetSequenceInformationExtractorgetSequenceSupportgetSqlAstTranslatorFactorygetTableCommentgetTableExportergetWriteLockStringgetWriteLockStringgetWriteRowLockStrategyisCurrentTimestampSelectStringCallableregisterColumnTypesregisterResultSetOutParameterregisterResultSetOutParametersupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsFractionalTimestampArithmeticsupportsJdbcConnectionLobCreationsupportsLateralsupportsNoColumnsInsertsupportsNoWaitsupportsOffsetInSubquerysupportsOrderByInSubquerysupportsPartitionBysupportsTableChecksupportsTupleDistinctCountssupportsUnboundedLobLocatorMaterializationsupportsWindowFunctionstimestampaddPatterntimestampdiffPattern

Constructor Detail

HANAColumnStoreDialectback to summary
public HANAColumnStoreDialect(DialectResolutionInfo info)
HANAColumnStoreDialectback to summary
public HANAColumnStoreDialect()
HANAColumnStoreDialectback to summary
public HANAColumnStoreDialect(DatabaseVersion version)

Method Detail

getCreateTableStringback to summary
public String getCreateTableString()

Overrides org.hibernate.dialect.Dialect.getCreateTableString.

Doc from org.hibernate.dialect.Dialect.getCreateTableString.

The command used to create a table, usually create table.

Returns:String

The command used to create a table.

Annotations
@Override
getFallbackSqmInsertStrategyback to summary
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)

Overrides org.hibernate.dialect.Dialect.getFallbackSqmInsertStrategy.

Doc from org.hibernate.dialect.Dialect.getFallbackSqmInsertStrategy.

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

The SqmMultiTableInsertStrategy to use when not specified by org.hibernate.query.spi.QueryEngineOptions#getCustomSqmMultiTableInsertStrategy.

Annotations
@Override
getFallbackSqmMutationStrategyback to summary
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)

Overrides org.hibernate.dialect.Dialect.getFallbackSqmMutationStrategy.

Doc from org.hibernate.dialect.Dialect.getFallbackSqmMutationStrategy.

Deprecated

as a consequence of RuntimeModelCreationContext being deprecated. See corresponding docs for further information.

The SqmMultiTableMutationStrategy to use when not specified by org.hibernate.query.spi.QueryEngineOptions#getCustomSqmMultiTableMutationStrategy.

Annotations
@Override
getMaxVarcharLengthback to summary
public int getMaxVarcharLength()

Overrides org.hibernate.dialect.AbstractHANADialect.getMaxVarcharLength.

Doc from org.hibernate.dialect.Dialect.getMaxVarcharLength.

The biggest size value that can be supplied as argument to a java.sql.Types#VARCHAR-like type.

For longer column lengths, use some sort of text-like type for the column.

Annotations
@Override
getSupportedTemporaryTableKindback to summary
public TemporaryTableKind getSupportedTemporaryTableKind()

Overrides org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

Doc from org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

The kind of temporary tables that are supported on this database.

Annotations
@Override
getTemporaryTableCreateCommandback to summary
public String getTemporaryTableCreateCommand()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableCreateCommand.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableCreateCommand.

The command to create a temporary table.

Annotations
@Override
getTemporaryTableCreateOptionsback to summary
public String getTemporaryTableCreateOptions()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableCreateOptions.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableCreateOptions.

An arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, or null if there are no options to specify.

Annotations
@Override
getTemporaryTableTruncateCommandback to summary
public String getTemporaryTableTruncateCommand()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableTruncateCommand.

Doc from org.hibernate.dialect.Dialect.getTemporaryTableTruncateCommand.

The command to truncate a temporary table.

Annotations
@Override
initializeFunctionRegistryback to summary
public void initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.AbstractHANADialect.initializeFunctionRegistry.

Doc from org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.

Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it.

These required functions include the functions defined by the JPA query language specification:

  • avg(arg) - aggregate function
  • count([distinct ]arg) - aggregate function
  • max(arg) - aggregate function
  • min(arg) - aggregate function
  • sum(arg) - aggregate function
  • coalesce(arg0, arg1, ...)
  • nullif(arg0, arg1)
  • lower(arg)
  • upper(arg)
  • length(arg)
  • concat(arg0, arg1, ...)
  • locate(pattern, string[, start])
  • substring(string, start[, length])
  • trim([[spec ][character ]from] string)
  • abs(arg)
  • mod(arg0, arg1)
  • sqrt(arg)
  • current date
  • current time
  • current timestamp
Along with an additional set of functions defined by ANSI SQL:
  • any(arg) - aggregate function
  • every(arg) - aggregate function
  • var_samp(arg) - aggregate function
  • var_pop(arg) - aggregate function
  • stddev_samp(arg) - aggregate function
  • stddev_pop(arg) - aggregate function
  • cast(arg as Type)
  • extract(field from arg)
  • ln(arg)
  • exp(arg)
  • power(arg0, arg1)
  • floor(arg)
  • ceiling(arg)
  • position(pattern in string)
  • substring(string from start[ for length])
  • overlay(string placing replacement from start[ for length])
And the following functions for working with java.time types:
  • local date
  • local time
  • local datetime
  • offset datetime
  • instant
And a number of additional "standard" functions:
  • left(string, length)
  • right(string, length)
  • replace(string, pattern, replacement)
  • pad(string with length spec[ character])
  • repeat(string, times)
  • pi
  • log10(arg)
  • log(base, arg)
  • sign(arg)
  • sin(arg)
  • cos(arg)
  • tan(arg)
  • asin(arg)
  • acos(arg)
  • atan(arg)
  • atan2(arg0, arg1)
  • round(arg0[, arg1])
  • truncate(arg0[, arg1])
  • sinh(arg)
  • tanh(arg)
  • cosh(arg)
  • least(arg0, arg1, ...)
  • greatest(arg0, arg1, ...)
  • degrees(arg)
  • radians(arg)
  • format(datetime as pattern)
  • collate(string as collation)
  • str(arg) - synonym of cast(a as String)
  • ifnull(arg0, arg1) - synonym of coalesce(a, b)
Finally, the following functions are defined as abbreviations for extract(), and desugared by the parser:
  • second(arg) - synonym of extract(second from a)
  • minute(arg) - synonym of extract(minute from a)
  • hour(arg) - synonym of extract(hour from a)
  • day(arg) - synonym of extract(day from a)
  • month(arg) - synonym of extract(month from a)
  • year(arg) - synonym of extract(year from a)
Note that according to this definition, the second() function returns a floating point value, contrary to the integer type returned by the native function with this name on many databases. Thus, we don't just naively map these HQL functions to the native SQL functions with the same names.
Annotations
@Override
isUseUnicodeStringTypesback to summary
public boolean isUseUnicodeStringTypes()

Overrides org.hibernate.dialect.AbstractHANADialect.isUseUnicodeStringTypes.

Annotations
@Override
registerDefaultKeywordsback to summary
protected void registerDefaultKeywords()

Overrides org.hibernate.dialect.AbstractHANADialect.registerDefaultKeywords.

Doc from org.hibernate.dialect.Dialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.

Annotations
@Override
supportsAsciiStringTypesback to summary
protected boolean supportsAsciiStringTypes()

Implements abstract org.hibernate.dialect.AbstractHANADialect.supportsAsciiStringTypes.

Annotations
@Override
useUnicodeStringTypesDefaultback to summary
protected Boolean useUnicodeStringTypesDefault()

Implements abstract org.hibernate.dialect.AbstractHANADialect.useUnicodeStringTypesDefault.

Annotations
@Override