public abstract class AbstractHANADialect extends Dialect
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.
Note: This dialect is configured to create foreign keys with on update cascade
.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractHANADialect.HANABlobTypeDescriptor |
Dialect.SizeStrategy, Dialect.SizeStrategyImpl
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, TWO_SINGLE_QUOTES_REPLACEMENT
Constructor and Description |
---|
AbstractHANADialect() |
Modifier and Type | Method and Description |
---|---|
IdentifierHelper |
buildIdentifierHelper(IdentifierHelperBuilder builder,
DatabaseMetaData dbMetaData)
Build the IdentifierHelper indicated by this Dialect for handling identifier conversions.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
String |
castPattern(CastType from,
CastType to)
Obtain a pattern for the SQL equivalent to a
cast() function call. |
void |
contributeTypes(TypeContributions typeContributions,
ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
|
ScrollMode |
defaultScrollMode()
Certain dialects support a subset of ScrollModes.
|
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
String |
extractPattern(TemporalUnit unit)
HANA has no extract() function, but we can emulate
it using the appropriate named functions instead of
extract().
|
boolean |
forUpdateOfColumns()
Does the FOR UPDATE OF clause accept a list of columns
instead of a list of table aliases?
|
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).
|
JdbcTypeDescriptor |
getBlobTypeDescriptor() |
CallableStatementSupport |
getCallableStatementSupport() |
String |
getCascadeConstraintsString()
The keyword that specifies that a
drop table operation
should be cascaded to its constraints, typically
" cascade" where the leading space is required, or
the empty string if there is no such keyword in this dialect. |
String |
getColumnComment(String comment)
Get the comment into a form supported for column definition.
|
String |
getCurrentSchemaCommand()
Get the SQL command used to retrieve the current schema name.
|
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the
database.
|
int |
getDefaultDecimalPrecision()
This is the default precision for a generated
column mapped to a
BigInteger
or BigDecimal . |
String |
getForUpdateNowaitString()
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
|
String |
getForUpdateNowaitString(String aliases)
Get the FOR UPDATE OF column_list NOWAIT fragment appropriate
for this dialect given the aliases of the columns to be write locked.
|
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.
|
String |
getFromDual()
Some databases require a bit of syntactic noise when
there are no tables in the from clause.
|
GroupByConstantRenderingStrategy |
getGroupByConstantRenderingStrategy()
The strategy to use for rendering constants in the GROUP BY clause.
|
IdentityColumnSupport |
getIdentityColumnSupport()
Get the appropriate
IdentityColumnSupport |
LimitHandler |
getLimitHandler()
Returns a
LimitHandler that implements support for
Query.setMaxResults(int) and
Query.setFirstResult(int) for
this dialect. |
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.
|
NameQualifierSupport |
getNameQualifierSupport()
By default interpret this based on DatabaseMetaData.
|
String |
getNotExpression(String expression)
Negate an expression
|
NullOrdering |
getNullOrdering()
Returns the ordering of null.
|
String |
getQueryHintString(String query,
List<String> hints)
Apply a hint to the query.
|
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
|
String |
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect.
|
String |
getReadLockString(String aliases,
int timeout)
Get the string to append to SELECT statements to acquire READ locks
for this dialect given the aliases of the columns to be read locked.
|
String |
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.
|
SequenceInformationExtractor |
getSequenceInformationExtractor()
A source of
SequenceInformation . |
SequenceSupport |
getSequenceSupport() |
SqlAstTranslatorFactory |
getSqlAstTranslatorFactory()
Return an SqlAstTranslatorFactory specific for the Dialect.
|
protected JdbcTypeDescriptor |
getSqlTypeDescriptorOverride(int sqlCode)
Returns the
JdbcTypeDescriptor that should be used to handle the given JDBC type code. |
String |
getTableComment(String comment)
Get the comment into a form supported for table definition.
|
Exporter<Table> |
getTableExporter() |
String |
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
String |
getWriteLockString(String aliases,
int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect given the aliases of the columns to be write locked.
|
RowLockStrategy |
getWriteRowLockStrategy()
The row lock strategy to use for write locks.
|
void |
initializeFunctionRegistry(QueryEngine queryEngine)
Initialize the given registry with any dialect-specific functions.
|
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
boolean |
isUseUnicodeStringTypes() |
protected void |
registerHanaKeywords() |
int |
registerResultSetOutParameter(CallableStatement statement,
int position)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet *by position*. |
int |
registerResultSetOutParameter(CallableStatement statement,
String name)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet *by name*. |
protected abstract boolean |
supportsAsciiStringTypes() |
boolean |
supportsColumnCheck()
HANA currently does not support check constraints.
|
boolean |
supportsCommentOn()
Does this dialect/database support commenting on tables, columns, etc?
|
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 |
supportsFractionalTimestampArithmetic()
Whether the database supports adding a fractional interval to a timestamp
e.g.
|
boolean |
supportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData)
Check whether the JDBC
Connection supports creating LOBs via Connection.createBlob() ,
Connection.createNClob() or Connection.createClob() . |
boolean |
supportsNoColumnsInsert()
Check if the INSERT statement is allowed to contain no column.
|
boolean |
supportsNoWait()
Does this dialect/database support NO_WAIT timeout.
|
boolean |
supportsOffsetInSubquery()
Does this dialect support offset in subqueries? Ex:
select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1 offset 1)
|
boolean |
supportsOrderByInSubquery()
Does this dialect support the order by clause in subqueries? Ex:
select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)
|
boolean |
supportsPartitionBy()
Does the underlying database support partition by
|
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 |
supportsSelectQueryWithoutFromClause() |
boolean |
supportsTableCheck()
Does this dialect support table-level check constraints?
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support `count(distinct a,b)`?
|
boolean |
supportsUnboundedLobLocatorMaterialization()
Is it supported to materialize a LOB locator outside the transaction in
which it was created?
Again, part of the trickiness here is the fact that this is largely
driver dependent.
|
boolean |
supportsValuesListForInsert()
Does this dialect/database support VALUES list (e.g.
|
boolean |
supportsWindowFunctions()
Does this dialect support window functions like `row_number() over (..)`
|
String |
timestampaddPattern(TemporalUnit unit,
TemporalType temporalType)
Obtain a pattern for the SQL equivalent to a
timestampadd() function call. |
String |
timestampdiffPattern(TemporalUnit unit,
TemporalType fromTemporalType,
TemporalType toTemporalType)
Obtain a pattern for the SQL equivalent to a
timestampdiff() function call. |
String |
toBooleanValueString(boolean bool)
The SQL literal value to which this database maps boolean values.
|
String |
translateDatetimeFormat(String format)
Translate the given datetime format string from
the pattern language defined by Java's
DateTimeFormatter to
whatever pattern language is understood by the
native datetime formatting function for this
database (often the to_char() function). |
protected abstract Boolean |
useUnicodeStringTypesDefault() |
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, binaryToDecimalPrecision, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, formatAsTimestamp, formatAsTimestamp, formatAsTimestamp, formatBinaryLiteral, formatDateTimeLiteral, formatDateTimeLiteral, formatDateTimeLiteral, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDialect, getDialect, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getEnumCheckCondition, getFallbackSqmMutationStrategy, getFloatPrecision, getForeignKeyExporter, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getGroupBySummarizationRenderingStrategy, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getNationalizationSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getRawTypeName, getRawTypeName, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceNextValString, getSequenceNextValString, getSizeStrategy, getSqmTranslatorFactory, getTableAliasSeparator, getTableTypeString, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getVersion, getViolatedConstraintNameExtractor, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerHibernateType, registerHibernateType, registerKeyword, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresFloatCastingOfIntegerDivision, requiresParensForTupleDistinctCounts, resolveSqlTypeDescriptor, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsFetchClause, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimit, supportsLimitOffset, supportsLobValueChangePropagation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNullPrecedence, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInSubquery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSequences, supportsSkipLocked, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTemporalLiteralOffset, supportsTemporaryTables, supportsTimezoneTypes, supportsTruncateWithCast, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnionAll, supportsUnionInSubquery, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, supportsWait, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit, wrapDateLiteral, wrapTimeLiteral, wrapTimestampLiteral
public String castPattern(CastType from, CastType to)
Dialect
cast()
function call. The resulting
pattern must contain ?1 and ?2 placeholders
for the arguments.castPattern
in class Dialect
from
- a CastType
indicating the
type of the value argumentto
- a CastType
indicating the
type the value argument is cast topublic int getDefaultDecimalPrecision()
Dialect
BigInteger
or BigDecimal
.
Usually returns the maximum precision of the database, except when there is no such maximum precision, or the maximum precision is very high.
getDefaultDecimalPrecision
in class Dialect
public void initializeFunctionRegistry(QueryEngine queryEngine)
Dialect
initializeFunctionRegistry
in class Dialect
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Dialect
null
to use Hibernate's standard translator.getSqlAstTranslatorFactory
in class Dialect
StandardSqlAstTranslatorFactory
,
JdbcEnvironment.getSqlAstTranslatorFactory()
public String extractPattern(TemporalUnit unit)
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
.extractPattern
in class Dialect
unit
- the first argumentpublic 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 RowLockStrategy getWriteRowLockStrategy()
Dialect
getWriteRowLockStrategy
in class Dialect
public String getAddColumnString()
Dialect
getAddColumnString
in class Dialect
public String getAddColumnSuffixString()
Dialect
getAddColumnSuffixString
in class Dialect
public String getCascadeConstraintsString()
Dialect
drop table
operation
should be cascaded to its constraints, typically
" cascade"
where the leading space is required, or
the empty string if there is no such keyword in this dialect.getCascadeConstraintsString
in class Dialect
public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString
in class Dialect
public 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 getForUpdateNowaitString()
Dialect
getForUpdateNowaitString
in class Dialect
public String getNotExpression(String expression)
Dialect
getNotExpression
in class Dialect
expression
- The expression to negatepublic String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public SequenceInformationExtractor getSequenceInformationExtractor()
Dialect
SequenceInformation
.getSequenceInformationExtractor
in class Dialect
protected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
Dialect
JdbcTypeDescriptor
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 typeJdbcTypeDescriptor
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 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 supportsUnboundedLobLocatorMaterialization()
Dialect
Dialect.supportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction...supportsUnboundedLobLocatorMaterialization
in class Dialect
public SequenceSupport getSequenceSupport()
getSequenceSupport
in class Dialect
public boolean supportsTableCheck()
Dialect
supportsTableCheck
in class Dialect
public boolean supportsTupleDistinctCounts()
Dialect
supportsTupleDistinctCounts
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 LimitHandler getLimitHandler()
Dialect
LimitHandler
that implements support for
Query.setMaxResults(int)
and
Query.setFirstResult(int)
for
this dialect.getLimitHandler
in class Dialect
public String getSelectGUIDString()
Dialect
getSelectGUIDString
in class Dialect
public NameQualifierSupport getNameQualifierSupport()
Dialect
getNameQualifierSupport
in class Dialect
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException
Dialect
null
is allowed and indicates that Hibernate should fallback to building a
"standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilder
during this call will still be incorporated into the built IdentifierHelper.
The incoming builder will have the following set:IdentifierHelperBuilder.isGloballyQuoteIdentifiers()
IdentifierHelperBuilder.getUnquotedCaseStrategy()
- initialized to UPPERIdentifierHelperBuilder.getQuotedCaseStrategy()
- initialized to MIXEDIdentifierHelperBuilder.applyIdentifierCasing(DatabaseMetaData)
IdentifierHelperBuilder.applyReservedWords(DatabaseMetaData)
AnsiSqlKeywords.sql2003()
as reserved wordsbuildIdentifierHelper
in class Dialect
builder
- A semi-configured IdentifierHelper builder.dbMetaData
- Access to the metadata returned from the driver if needed and if available. WARNING: may be null
null
to indicate Hibernate should use its fallback pathSQLException
- Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.Dialect.getNameQualifierSupport()
public String getCurrentSchemaCommand()
Dialect
Dialect.getSchemaNameResolver()
, unless the return from there does not need this
information. E.g., a custom impl might make use of the Java 1.7 addition of
the Connection.getSchema()
methodgetCurrentSchemaCommand
in class Dialect
public String getForUpdateNowaitString(String aliases)
Dialect
getForUpdateNowaitString
in class Dialect
aliases
- The columns to be write locked.public String getReadLockString(int timeout)
Dialect
getReadLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(String aliases, int timeout)
Dialect
getReadLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(int timeout)
Dialect
getWriteLockString
in class Dialect
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(String aliases, int timeout)
Dialect
getWriteLockString
in class Dialect
aliases
- The columns to be read locked.timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.public String getFromDual()
Dialect
getFromDual
in class Dialect
from dual
.public boolean supportsSelectQueryWithoutFromClause()
supportsSelectQueryWithoutFromClause
in class Dialect
public String getQueryHintString(String query, List<String> hints)
Dialect
getQueryHintString
in class Dialect
query
- The query to which to apply the hint.hints
- The hints to applypublic String getTableComment(String comment)
Dialect
getTableComment
in class Dialect
comment
- The comment to applypublic String getColumnComment(String comment)
Dialect
getColumnComment
in class Dialect
comment
- The comment to applypublic boolean supportsCommentOn()
Dialect
supportsCommentOn
in class Dialect
true
if commenting is supportedpublic boolean supportsPartitionBy()
Dialect
supportsPartitionBy
in class Dialect
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Dialect
contributeTypes
in class Dialect
typeContributions
- Callback to contribute the typesserviceRegistry
- The service registrypublic JdbcTypeDescriptor getBlobTypeDescriptor()
public String toBooleanValueString(boolean bool)
Dialect
toBooleanValueString
in class Dialect
bool
- The boolean valuepublic IdentityColumnSupport getIdentityColumnSupport()
Dialect
IdentityColumnSupport
getIdentityColumnSupport
in class Dialect
public Exporter<Table> getTableExporter()
getTableExporter
in class Dialect
public CallableStatementSupport getCallableStatementSupport()
getCallableStatementSupport
in class Dialect
public int registerResultSetOutParameter(CallableStatement statement, int position) throws SQLException
Dialect
ResultSet
*by position*. Pre-Java 8, registering such ResultSet-returning
parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.registerResultSetOutParameter
in class Dialect
statement
- The callable statement.position
- The bind position at which to register the output param.SQLException
- Indicates problems registering the param.public int registerResultSetOutParameter(CallableStatement statement, String name) throws SQLException
Dialect
ResultSet
*by name*. Pre-Java 8, registering such ResultSet-returning
parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.registerResultSetOutParameter
in class Dialect
statement
- The callable statement.name
- The parameter name (for drivers which support named parameters).SQLException
- Indicates problems registering the param.public boolean supportsOffsetInSubquery()
Dialect
supportsOffsetInSubquery
in class Dialect
public boolean supportsWindowFunctions()
Dialect
supportsWindowFunctions
in class Dialect
true
if the underlying database supports window functions,
false
otherwise. The default is false
.public boolean supportsNoWait()
Dialect
supportsNoWait
in class Dialect
true
if NO_WAIT is supportedpublic boolean supportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData)
Dialect
Connection
supports creating LOBs via Connection.createBlob()
,
Connection.createNClob()
or Connection.createClob()
.supportsJdbcConnectionLobCreation
in class Dialect
databaseMetaData
- JDBC DatabaseMetaData
which can be used if LOB creation is supported only starting from a given Driver versiontrue
if LOBs can be created via the JDBC Connection.public boolean supportsNoColumnsInsert()
Dialect
supportsNoColumnsInsert
in class Dialect
public boolean supportsValuesListForInsert()
Dialect
supportsValuesListForInsert
in class Dialect
true
if VALUES list are supported for insert statementspublic boolean supportsOrderByInSubquery()
Dialect
supportsOrderByInSubquery
in class Dialect
public NullOrdering getNullOrdering()
Dialect
getNullOrdering
in class Dialect
public String translateDatetimeFormat(String format)
Dialect
DateTimeFormatter
to
whatever pattern language is understood by the
native datetime formatting function for this
database (often the to_char()
function).
Since it's never possible to translate all of
the pattern letter sequences understood by
DateTimeFormatter
, only the following
subset of pattern letters is accepted by
Hibernate:
translateDatetimeFormat
in class Dialect
public boolean supportsFractionalTimestampArithmetic()
Dialect
supportsFractionalTimestampArithmetic
in class Dialect
public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType)
Dialect
timestampadd()
function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampaddPattern
in class Dialect
unit
- the first argumenttemporalType
- true if the third argument is apublic String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
Dialect
timestampdiff()
function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampdiffPattern
in class Dialect
unit
- the first argumentfromTemporalType
- true if the first argument is
a timestamp, false if a datetoTemporalType
- true if the second argument ispublic boolean isUseUnicodeStringTypes()
protected abstract boolean supportsAsciiStringTypes()
protected abstract Boolean useUnicodeStringTypesDefault()
public GroupByConstantRenderingStrategy getGroupByConstantRenderingStrategy()
Dialect
getGroupByConstantRenderingStrategy
in class Dialect
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.