Package org.hibernate.dialect
Class HANAColumnStoreDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.AbstractHANADialect
-
- org.hibernate.dialect.HANAColumnStoreDialect
-
- All Implemented Interfaces:
FunctionContributor,TypeContributor,ConversionContext
- Direct Known Subclasses:
HANACloudColumnStoreDialect,HANASpatialDialect
public class HANAColumnStoreDialect extends AbstractHANADialect
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.dialect.AbstractHANADialect
AbstractHANADialect.HANABlobType
-
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
Dialect.SizeStrategy, 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 HANAColumnStoreDialect()HANAColumnStoreDialect(DatabaseVersion version)HANAColumnStoreDialect(DialectResolutionInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCreateTableString()The command used to create a table, usuallycreate table.SqmMultiTableInsertStrategygetFallbackSqmInsertStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)TheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().SqmMultiTableMutationStrategygetFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)TheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().intgetMaxVarcharLength()The biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.TemporaryTableKindgetSupportedTemporaryTableKind()The kind of temporary tables that are supported on this database.StringgetTemporaryTableCreateCommand()The command to create a temporary table.StringgetTemporaryTableCreateOptions()An arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, ornullif there are no options to specify.StringgetTemporaryTableTruncateCommand()The command to truncate a temporary table.voidinitializeFunctionRegistry(FunctionContributions functionContributions)Initialize the given registry with any dialect-specific functions.booleanisUseUnicodeStringTypes()protected voidregisterDefaultKeywords()Register the reserved words of ANSI-standard SQL as keywords.protected booleansupportsAsciiStringTypes()protected BooleanuseUnicodeStringTypesDefault()-
Methods inherited from class org.hibernate.dialect.AbstractHANADialect
appendBooleanValueString, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, buildIdentifierHelper, buildSQLExceptionConversionDelegate, castPattern, columnType, contributeTypes, createVersion, defaultScrollMode, dropConstraints, extractPattern, generatedAs, getAddColumnString, getAddColumnSuffixString, getBlobTypeDescriptor, getCallableStatementSupport, getCascadeConstraintsString, getColumnComment, getCurrentSchemaCommand, getCurrentTimestampSelectString, getDefaultDecimalPrecision, getDefaultNonContextualLobCreation, getDefaultUseGetGeneratedKeys, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getIdentityColumnSupport, getLimitHandler, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharLength, getMaxVarbinaryLength, getNameQualifierSupport, getNullOrdering, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getSelectGUIDString, getSequenceInformationExtractor, getSequenceSupport, getSqlAstTranslatorFactory, getTableComment, getTableExporter, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, isCurrentTimestampSelectStringCallable, registerColumnTypes, registerResultSetOutParameter, registerResultSetOutParameter, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFractionalTimestampArithmetic, supportsJdbcConnectionLobCreation, supportsLateral, supportsNoColumnsInsert, supportsNoWait, supportsOffsetInSubquery, supportsOrderByInSubquery, supportsPartitionBy, supportsTableCheck, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsValuesListForInsert, supportsWindowFunctions, timestampaddPattern, timestampdiffPattern
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendArrayLiteral, appendBinaryLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castType, checkVersion, closeQuote, contribute, contributeFunctions, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLobAsLastValue, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getDefaultLobLength, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFloatPrecision, getForeignKeyExporter, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxVarbinaryCapacity, getMaxVarcharCapacity, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNationalizationSupport, getNativeIdentifierGenerationType, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getParameterCountLimit, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSizeStrategy, getSqmTranslatorFactory, getTableCleaner, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, isLockTimeoutParameterized, openQuote, ordinal, prependComment, qualifyIndexName, quote, registerKeyword, registerKeywords, requiresCastForConcatenatingNonStrings, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, rowId, rowIdSqlType, supportsAlterColumnType, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsDistinctFromPredicate, supportsFetchClause, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedParameters, supportsNonQueryWithCTE, supportsNullPrecedence, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPredicateAsExpression, supportsRecursiveCTE, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsWait, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useArrayForMultiValuedParameters, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
-
-
-
Constructor Detail
-
HANAColumnStoreDialect
public HANAColumnStoreDialect(DialectResolutionInfo info)
-
HANAColumnStoreDialect
public HANAColumnStoreDialect()
-
HANAColumnStoreDialect
public HANAColumnStoreDialect(DatabaseVersion version)
-
-
Method Detail
-
isUseUnicodeStringTypes
public boolean isUseUnicodeStringTypes()
- Overrides:
isUseUnicodeStringTypesin classAbstractHANADialect
-
getMaxVarcharLength
public int getMaxVarcharLength()
Description copied from class:DialectThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.For longer column lengths, use some sort of
text-like type for the column.- Overrides:
getMaxVarcharLengthin classAbstractHANADialect
-
registerDefaultKeywords
protected void registerDefaultKeywords()
Description copied from class:DialectRegister the reserved words of ANSI-standard SQL as keywords.- Overrides:
registerDefaultKeywordsin classAbstractHANADialect- See Also:
AnsiSqlKeywords
-
initializeFunctionRegistry
public void initializeFunctionRegistry(FunctionContributions functionContributions)
Description copied from class:DialectInitialize 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
-
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])
java.timetypes:-
local date -
local time -
local datetime -
offset datetime -
instant
-
left(string, length) -
right(string, length) -
replace(string, pattern, replacement) -
pad(string with length spec[ character])
-
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 ofcast(a as String) -
ifnull(arg0, arg1)- synonym ofcoalesce(a, b)
extract(), and desugared by the parser:-
second(arg)- synonym ofextract(second from a) -
minute(arg)- synonym ofextract(minute from a) -
hour(arg)- synonym ofextract(hour from a) -
day(arg)- synonym ofextract(day from a) -
month(arg)- synonym ofextract(month from a) -
year(arg)- synonym ofextract(year from a)
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.- Overrides:
initializeFunctionRegistryin classAbstractHANADialect
-
-
getCreateTableString
public String getCreateTableString()
Description copied from class:DialectThe command used to create a table, usuallycreate table.- Overrides:
getCreateTableStringin classDialect- Returns:
- The command used to create a table.
-
getFallbackSqmMutationStrategy
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
Description copied from class:DialectTheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().
-
getFallbackSqmInsertStrategy
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
Description copied from class:DialectTheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().
-
getSupportedTemporaryTableKind
public TemporaryTableKind getSupportedTemporaryTableKind()
Description copied from class:DialectThe kind of temporary tables that are supported on this database.- Overrides:
getSupportedTemporaryTableKindin classDialect
-
getTemporaryTableCreateOptions
public String getTemporaryTableCreateOptions()
Description copied from class:DialectAn arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, ornullif there are no options to specify.- Overrides:
getTemporaryTableCreateOptionsin classDialect
-
getTemporaryTableCreateCommand
public String getTemporaryTableCreateCommand()
Description copied from class:DialectThe command to create a temporary table.- Overrides:
getTemporaryTableCreateCommandin classDialect
-
getTemporaryTableTruncateCommand
public String getTemporaryTableTruncateCommand()
Description copied from class:DialectThe command to truncate a temporary table.- Overrides:
getTemporaryTableTruncateCommandin classDialect
-
supportsAsciiStringTypes
protected boolean supportsAsciiStringTypes()
- Specified by:
supportsAsciiStringTypesin classAbstractHANADialect
-
useUnicodeStringTypesDefault
protected Boolean useUnicodeStringTypesDefault()
- Specified by:
useUnicodeStringTypesDefaultin classAbstractHANADialect
-
-