public abstract class AbstractHANADialect extends Dialect
on update cascade
.CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
Constructor and Description |
---|
AbstractHANADialect() |
Modifier and Type | Method and Description |
---|---|
boolean |
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
ScrollMode |
defaultScrollMode()
Certain dialects support a subset of ScrollModes.
|
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
boolean |
forUpdateOfColumns()
Is FOR UPDATE OF syntax supported?
|
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
String |
getAddColumnSuffixString()
The syntax for the suffix used to add a column to a table (optional).
|
String |
getAddForeignKeyConstraintString(String constraintName,
String[] foreignKey,
String referencedTable,
String[] primaryKey,
boolean referencesPrimaryKey)
The default behaviour for 'on update restrict' on HANA is currently
to not allow any updates to any column of a row if the row has a
foreign key.
|
String |
getCascadeConstraintsString()
Completely optional cascading drop clause
|
String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence
with a single command.
|
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the
database.
|
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence
with a single command.
|
String |
getForUpdateString(String aliases)
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
String |
getForUpdateString(String aliases,
LockOptions lockOptions)
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
LimitHandler |
getLimitHandler()
Returns the delegate managing LIMIT clause.
|
String |
getLimitString(String sql,
boolean hasOffset)
Apply s limit clause to the query.
|
int |
getMaxAliasLength()
What is the maximum length Hibernate can use for generated aliases?
The maximum here should account for the fact that Hibernate often needs to append "uniqueing" information
to the end of generated aliases.
|
String |
getNotExpression(String expression)
Negate an expression
|
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
|
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
|
String |
getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retrieve the next value
of a sequence.
|
protected SqlTypeDescriptor |
getSqlTypeDescriptorOverride(int sqlCode)
Returns the
SqlTypeDescriptor that should be used to handle the given JDBC type code. |
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
protected void |
registerHanaKeywords() |
boolean |
supportsCircularCascadeDeleteConstraints()
Does this dialect support definition of cascade delete constraints
which can cause circular chains?
|
boolean |
supportsColumnCheck()
HANA currently does not support check constraints.
|
boolean |
supportsCurrentTimestampSelection()
Does this dialect support a way to retrieve the database's current
timestamp value?
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
|
boolean |
supportsExistsInSelect()
Does the dialect support an exists statement in the select clause?
|
boolean |
supportsExpectedLobUsagePattern()
Expected LOB usage pattern is such that I can perform an insert
via prepared statement with a parameter binding for a LOB value
without crazy casting to JDBC driver implementation-specific classes...
|
boolean |
supportsLimit()
Does this dialect support some form of limiting query results
via a SQL clause?
|
boolean |
supportsPooledSequences()
Does this dialect support "pooled" sequences.
|
boolean |
supportsRowValueConstructorSyntax()
Is this dialect known to support what ANSI-SQL terms "row value
constructor" syntax; sometimes called tuple syntax.
|
boolean |
supportsRowValueConstructorSyntaxInInList()
If the dialect supports
row values ,
does it offer such support in IN lists as well?
For example, "... |
boolean |
supportsSequences()
Does this dialect support sequences?
|
boolean |
supportsTableCheck()
Does this dialect support table-level check constraints?
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support `count(distinct a,b)`?
|
boolean |
supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, forceLimitUsage, forceLobAsLastValue, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnSupport, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getReadLockString, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, openQuote, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCommentOn, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimitOffset, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
public boolean bindLimitParametersInReverseOrder()
Dialect
bindLimitParametersInReverseOrder
in class Dialect
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Dialect
SQLExceptionConversionDelegate
for
interpreting dialect-specific error or SQLState codes.
When Dialect.buildSQLExceptionConverter()
returns null, the default
SQLExceptionConverter
is used to interpret SQLState and
error codes. If this method is overridden to return a non-null value,
the default SQLExceptionConverter
will use the returned
SQLExceptionConversionDelegate
in addition to the following
standard delegates:
buildSQLExceptionConversionDelegate
in class Dialect
public boolean forUpdateOfColumns()
Dialect
forUpdateOfColumns
in class Dialect
public String getAddColumnString()
Dialect
getAddColumnString
in class Dialect
public String getAddColumnSuffixString()
Dialect
getAddColumnSuffixString
in class Dialect
public String getCascadeConstraintsString()
Dialect
getCascadeConstraintsString
in class Dialect
public String getCreateSequenceString(String sequenceName)
Dialect
Dialect.getCreateSequenceStrings(java.lang.String)
to help facilitate that.
Dialects which support sequences and can create a sequence in a
single command need *only* override this method. Dialects
which support sequences but require multiple commands to create
a sequence should instead override Dialect.getCreateSequenceStrings(java.lang.String)
.getCreateSequenceString
in class Dialect
sequenceName
- The name of the sequencepublic MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy
in class Dialect
public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString
in class Dialect
public String getDropSequenceString(String sequenceName)
Dialect
Dialect.getDropSequenceStrings(java.lang.String)
to help facilitate that.
Dialects which support sequences and can drop a sequence in a
single command need *only* override this method. Dialects
which support sequences but require multiple commands to drop
a sequence should instead override Dialect.getDropSequenceStrings(java.lang.String)
.getDropSequenceString
in class Dialect
sequenceName
- The name of the sequencepublic String getForUpdateString(String aliases)
Dialect
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateString(String aliases, LockOptions lockOptions)
Dialect
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.lockOptions
- the lock options to applypublic String getLimitString(String sql, boolean hasOffset)
Dialect
variable
limit clauses when they support limits. Thus, when building the
select command we do not actually need to know the limit or the offest
since we will just be using placeholders.
Here we do still pass along whether or not an offset was specified
so that dialects not supporting offsets can generate proper exceptions.
In general, dialects will override one or the other of this method and
Dialect.getLimitString(String, int, int)
.getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?public String getNotExpression(String expression)
Dialect
getNotExpression
in class Dialect
expression
- The expression to negatepublic String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public String getSelectSequenceNextValString(String sequenceName)
Dialect
Dialect.getSequenceNextValString(String)
in that this
should return an expression usable within another statement.getSelectSequenceNextValString
in class Dialect
sequenceName
- the name of the sequencepublic String getSequenceNextValString(String sequenceName)
Dialect
getSequenceNextValString
in class Dialect
sequenceName
- the name of the sequenceprotected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
Dialect
SqlTypeDescriptor
that should be used to handle the given JDBC type code. Returns
null
if there is no override.getSqlTypeDescriptorOverride
in class Dialect
sqlCode
- A Types
constant indicating the SQL column typeSqlTypeDescriptor
to use as an override, or null
if there is no override.public boolean isCurrentTimestampSelectStringCallable()
Dialect
Dialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used...isCurrentTimestampSelectStringCallable
in class Dialect
Dialect.getCurrentTimestampSelectString()
return
is callable; false otherwise.protected void registerHanaKeywords()
public boolean supportsCircularCascadeDeleteConstraints()
Dialect
supportsCircularCascadeDeleteConstraints
in class Dialect
public ScrollMode defaultScrollMode()
Dialect
defaultScrollMode
in class Dialect
public boolean supportsColumnCheck()
supportsColumnCheck
in class Dialect
public boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection
in class Dialect
public boolean supportsEmptyInList()
Dialect
supportsEmptyInList
in class Dialect
public boolean supportsExistsInSelect()
Dialect
supportsExistsInSelect
in class Dialect
public boolean supportsExpectedLobUsagePattern()
Dialect
supportsExpectedLobUsagePattern
in class Dialect
public boolean supportsLimit()
Dialect
supportsLimit
in class Dialect
public boolean supportsPooledSequences()
Dialect
supportsPooledSequences
in class Dialect
Dialect.getCreateSequenceStrings(String, int, int)
,
Dialect.getCreateSequenceString(String, int, int)
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public boolean supportsTableCheck()
Dialect
supportsTableCheck
in class Dialect
public boolean supportsTupleDistinctCounts()
Dialect
supportsTupleDistinctCounts
in class Dialect
public boolean supportsUnionAll()
Dialect
supportsUnionAll
in class Dialect
public boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
public boolean supportsRowValueConstructorSyntax()
Dialect
supportsRowValueConstructorSyntax
in class Dialect
public boolean supportsRowValueConstructorSyntaxInInList()
Dialect
row values
,
does it offer such support in IN lists as well?
For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."supportsRowValueConstructorSyntaxInInList
in class Dialect
public int getMaxAliasLength()
Dialect
getMaxAliasLength
in class Dialect
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
getAddForeignKeyConstraintString
in class Dialect
constraintName
- The FK constraint name.foreignKey
- The names of the columns comprising the FKreferencedTable
- The table referenced by the FKprimaryKey
- The explicit columns in the referencedTable referenced
by this FK.referencesPrimaryKey
- if false, constraint should be
explicit about which column names the constraint refers topublic LimitHandler getLimitHandler()
Dialect
getLimitHandler
in class Dialect
Copyright © 2017 JBoss by Red Hat. All rights reserved.