Package org.hibernate.dialect
Class HANAColumnStoreDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.AbstractHANADialect
-
- org.hibernate.dialect.HANAColumnStoreDialect
-
- All Implemented Interfaces:
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_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description HANAColumnStoreDialect()
HANAColumnStoreDialect(DatabaseVersion version)
HANAColumnStoreDialect(DialectResolutionInfo info)
-
Method Summary
-
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, createUpsertOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLobAsLastValue, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getDefaultBatchLoadSizingStrategy, getDefaultLobLength, getDefaultProperties, getDefaultStatementBatchSize, getDefaultTimestampPrecision, getDisableConstraintsStatement, getDisableConstraintStatement, 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, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSizeStrategy, getSqmTranslatorFactory, getTableCleaner, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, openQuote, prependComment, qualifyIndexName, quote, registerKeyword, registerKeywords, requiresCastForConcatenatingNonStrings, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeDescriptor, resolveSqlTypeLength, 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, 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:
isUseUnicodeStringTypes
in classAbstractHANADialect
-
getMaxVarcharLength
public int getMaxVarcharLength()
Description copied from class:Dialect
The biggest size value that can be supplied as argument to aTypes.VARCHAR
-like type. For longer column lengths, use some sort oftext
-like type for the column.- Overrides:
getMaxVarcharLength
in classAbstractHANADialect
-
registerDefaultKeywords
protected void registerDefaultKeywords()
- Overrides:
registerDefaultKeywords
in classAbstractHANADialect
-
initializeFunctionRegistry
public void initializeFunctionRegistry(QueryEngine queryEngine)
Description copied from class:Dialect
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
-
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.time
types:-
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:
initializeFunctionRegistry
in classAbstractHANADialect
-
-
getCreateTableString
public String getCreateTableString()
Description copied from class:Dialect
Command used to create a table.- Overrides:
getCreateTableString
in classDialect
- Returns:
- The command used to create a table.
-
getFallbackSqmMutationStrategy
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
- Overrides:
getFallbackSqmMutationStrategy
in classDialect
-
getFallbackSqmInsertStrategy
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
- Overrides:
getFallbackSqmInsertStrategy
in classDialect
-
getSupportedTemporaryTableKind
public TemporaryTableKind getSupportedTemporaryTableKind()
- Overrides:
getSupportedTemporaryTableKind
in classDialect
-
getTemporaryTableCreateOptions
public String getTemporaryTableCreateOptions()
- Overrides:
getTemporaryTableCreateOptions
in classDialect
-
getTemporaryTableCreateCommand
public String getTemporaryTableCreateCommand()
- Overrides:
getTemporaryTableCreateCommand
in classDialect
-
getTemporaryTableTruncateCommand
public String getTemporaryTableTruncateCommand()
- Overrides:
getTemporaryTableTruncateCommand
in classDialect
-
supportsAsciiStringTypes
protected boolean supportsAsciiStringTypes()
- Specified by:
supportsAsciiStringTypes
in classAbstractHANADialect
-
useUnicodeStringTypesDefault
protected Boolean useUnicodeStringTypesDefault()
- Specified by:
useUnicodeStringTypesDefault
in classAbstractHANADialect
-
-