public class DB2Dialect extends Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImplCLOSED_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 |
|---|
DB2Dialect() |
DB2Dialect(DialectResolutionInfo info) |
DB2Dialect(int version) |
| Modifier and Type | Method and Description |
|---|---|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
protected UniqueDelegate |
createUniqueDelegate() |
boolean |
doesReadCommittedCauseWritersToBlockReaders()
For the underlying database, is READ_COMMITTED isolation implemented by
forcing readers to wait for write locks to be released?
|
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
String |
extractPattern(TemporalUnit unit)
Obtain a pattern for the SQL equivalent to an
extract() function call. |
String |
formatBinaryLiteral(byte[] bytes) |
String |
getCrossJoinSeparator()
The separator to use for declaring cross joins in a SQL query,
typically either
" cross join " or a comma ", ",
where the spaces are required. |
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[] |
getDropSchemaCommand(String schemaName)
Get the SQL command used to drop the named schema
|
SqmMultiTableMutationStrategy |
getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor,
RuntimeModelCreationContext runtimeModelCreationContext) |
String |
getForUpdateSkipLockedString()
Retrieves the FOR UPDATE SKIP LOCKED syntax specific to this dialect.
|
String |
getForUpdateSkipLockedString(String aliases)
Get the FOR UPDATE OF column_list SKIP LOCKED fragment appropriate
for this dialect given the aliases of the columns to be write locked.
|
String |
getForUpdateString()
Get the string to append to SELECT statements to acquire locks
for this dialect.
|
long |
getFractionalSecondPrecisionInNanos()
Since we're using
seconds_between() and
add_seconds(), it makes sense to use
seconds as the "native" precision. |
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.
|
GroupBySummarizationRenderingStrategy |
getGroupBySummarizationRenderingStrategy()
The strategy to use for rendering summarizations 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. |
String |
getLowercaseFunction()
The name of the SQL function that transforms a string to
lowercase
|
String |
getNotExpression(String expression)
Negate an expression
|
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.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
String |
getSelectClauseNullString(int sqlType)
Given a
Types type code, determine an appropriate
null value to use in a select clause. |
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. |
UniqueDelegate |
getUniqueDelegate()
Get the UniqueDelegate supported by this dialect
|
int |
getVersion() |
String |
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks
for this dialect.
|
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. |
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet *by position*. |
String |
renderOrderByElement(String expression,
String collation,
String order,
NullPrecedence nullPrecedence)
Handle DB2 "support" for null precedence...
|
boolean |
requiresCastingOfParametersInSelectClause()
Does this dialect require that parameters appearing in the SELECT clause be wrapped in cast()
calls to tell the db parser the expected type.
|
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 |
supportsLobValueChangePropagation()
Does the dialect support propagating changes to LOB
values back to the database? Talking about mutating the
internal value of the locator as opposed to supplying a new
locator instance...
|
boolean |
supportsLockTimeouts()
Informational metadata about whether this dialect is known to support
specifying timeouts for requested lock acquisitions.
|
boolean |
supportsNonQueryWithCTE()
Does this dialect/database support non-query statements (e.g.
|
boolean |
supportsNullPrecedence() |
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 |
supportsOuterJoinForUpdate()
Does this dialect support FOR UPDATE in conjunction with
outer joined rows?
|
boolean |
supportsParametersInInsertSelect()
Does this dialect support parameters within the SELECT clause of
INSERT ...
|
boolean |
supportsPartitionBy()
Does the underlying database support partition by
|
boolean |
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
Does this dialect support asking the result set its positioning
information on forward only cursors.
|
boolean |
supportsRowValueConstructorSyntaxInInList()
If the dialect supports
row values,
does it offer such support in IN lists as well?
For example, "... |
boolean |
supportsSelectQueryWithoutFromClause() |
boolean |
supportsSkipLocked()
Does this dialect/database support SKIP_LOCKED timeout.
|
boolean |
supportsTupleDistinctCounts()
Does this dialect support `count(distinct a,b)`?
|
boolean |
supportsValuesList()
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). |
String |
translateExtractField(TemporalUnit unit)
Return the name used to identify the given field
as an argument to the
extract() function,
or of this dialect's equivalent
function. |
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, binaryToDecimalPrecision, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, castPattern, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, formatAsTimestamp, formatAsTimestamp, formatAsTimestamp, formatDateTimeLiteral, formatDateTimeLiteral, formatDateTimeLiteral, forUpdateOfColumns, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDialect, getDialect, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getDropTableString, getEnumCheckCondition, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getMaxAliasLength, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getRawTypeName, getRawTypeName, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSelectSequenceNextValString, getSequenceExporter, getSequenceNextValString, getSequenceNextValString, getSizeStrategy, getSqmTranslatorFactory, getTableAliasSeparator, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueKeyExporter, getViolatedConstraintNameExtractor, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresFloatCastingOfIntegerDivision, requiresParensForTupleDistinctCounts, resolveSqlTypeDescriptor, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsJdbcConnectionLobCreation, supportsLimit, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNotNullUnique, supportsNoWait, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInSubquery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSequences, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTables, supportsTimezoneTypes, supportsTruncateWithCast, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesListForInsert, supportsVariableLimit, supportsWait, toString, transformSelectString, translateDurationField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit, wrapDateLiteral, wrapTimeLiteral, wrapTimestampLiteralpublic DB2Dialect(DialectResolutionInfo info)
public DB2Dialect()
public DB2Dialect(int version)
protected UniqueDelegate createUniqueDelegate()
public int getDefaultDecimalPrecision()
DialectBigInteger
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 Dialectpublic int getVersion()
getVersion in class Dialectpublic void initializeFunctionRegistry(QueryEngine queryEngine)
DialectinitializeFunctionRegistry in class Dialectpublic String[] getDropSchemaCommand(String schemaName)
DialectgetDropSchemaCommand in class DialectschemaName - The name of the schema to be dropped.public long getFractionalSecondPrecisionInNanos()
seconds_between() and
add_seconds(), it makes sense to use
seconds as the "native" precision.getFractionalSecondPrecisionInNanos in class DialectTemporalUnit.NATIVEpublic String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
Dialecttimestampdiff() function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampdiffPattern in class Dialectunit - the first argumentfromTemporalType - true if the first argument is
a timestamp, false if a datetoTemporalType - true if the second argument ispublic String timestampaddPattern(TemporalUnit unit, TemporalType temporalType)
Dialecttimestampadd() function call. The resulting
pattern must contain ?1, ?2, and ?3 placeholders
for the arguments.timestampaddPattern in class Dialectunit - the first argumenttemporalType - true if the third argument is apublic String getLowercaseFunction()
DialectgetLowercaseFunction in class Dialectpublic boolean dropConstraints()
DialectdropConstraints in class Dialectpublic SequenceSupport getSequenceSupport()
getSequenceSupport in class Dialectpublic String getQuerySequencesString()
DialectgetQuerySequencesString in class DialectSchemaUpdatepublic SequenceInformationExtractor getSequenceInformationExtractor()
DialectSequenceInformation.getSequenceInformationExtractor in class Dialectpublic String getForUpdateString()
DialectgetForUpdateString in class Dialectpublic boolean supportsSkipLocked()
DialectsupportsSkipLocked in class Dialecttrue if SKIP_LOCKED is supportedpublic String getForUpdateSkipLockedString()
DialectgetForUpdateSkipLockedString in class Dialectpublic String getForUpdateSkipLockedString(String aliases)
DialectgetForUpdateSkipLockedString in class Dialectaliases - The columns to be write locked.public String getWriteLockString(int timeout)
DialectgetWriteLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getReadLockString(int timeout)
DialectgetReadLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public boolean supportsOuterJoinForUpdate()
DialectsupportsOuterJoinForUpdate in class Dialectpublic boolean supportsExistsInSelect()
DialectsupportsExistsInSelect in class Dialectpublic boolean supportsLockTimeouts()
DialectsupportsLockTimeouts in class Dialectpublic String getSelectClauseNullString(int sqlType)
DialectTypes type code, determine an appropriate
null value to use in a select clause.
One thing to consider here is that certain databases might
require proper casting for the nulls here since the select here
will be part of a UNION/UNION ALL.getSelectClauseNullString in class DialectsqlType - The Types type code.public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
DialectResultSet *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 Dialectstatement - The callable statement.col - The bind position at which to register the output param.SQLException - Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
DialectDialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.getResultSet in class Dialectps - The callable statement.SQLException - Indicates problems extracting the result set.public boolean supportsCommentOn()
DialectsupportsCommentOn in class Dialecttrue if commenting is supportedpublic SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
getFallbackSqmMutationStrategy in class Dialectpublic boolean supportsCurrentTimestampSelection()
DialectsupportsCurrentTimestampSelection in class Dialectpublic String getCurrentTimestampSelectString()
DialectgetCurrentTimestampSelectString in class Dialectpublic boolean isCurrentTimestampSelectStringCallable()
DialectDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape
syntax is being used...isCurrentTimestampSelectStringCallable in class DialectDialect.getCurrentTimestampSelectString() return
is callable; false otherwise.public boolean supportsParametersInInsertSelect()
requiresCastingOfParametersInSelectClause()).supportsParametersInInsertSelect in class Dialectpublic boolean requiresCastingOfParametersInSelectClause()
requiresCastingOfParametersInSelectClause in class Dialectpublic boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
DialectResultSet.isAfterLast() and
ResultSet.isBeforeFirst(). Certain drivers do not
allow access to these methods for forward only cursors.
NOTE : this is highly driver dependent!supportsResultSetPositionQueryMethodsOnForwardOnlyCursor in class DialectResultSet.isAfterLast() and
ResultSet.isBeforeFirst() are supported for forward
only cursors; false otherwise.public String getCrossJoinSeparator()
Dialect" cross join " or a comma ", ",
where the spaces are required.getCrossJoinSeparator in class Dialectpublic boolean supportsEmptyInList()
DialectsupportsEmptyInList in class Dialectpublic boolean supportsLobValueChangePropagation()
DialectBlob.setBinaryStream(long),
Blob.setBytes(long, byte[]),
Blob.setBytes(long, byte[], int, int),
or Blob.truncate(long).
For CLOBs, the internal value might be changed by:
Clob.setAsciiStream(long),
Clob.setCharacterStream(long),
Clob.setString(long, String),
Clob.setString(long, String, int, int),
or Clob.truncate(long).
NOTE : I do not know the correct answer currently for
databases which (1) are not part of the cruise control process
or (2) do not Dialect.supportsExpectedLobUsagePattern().supportsLobValueChangePropagation in class Dialectpublic boolean doesReadCommittedCauseWritersToBlockReaders()
DialectdoesReadCommittedCauseWritersToBlockReaders in class Dialectpublic boolean supportsTupleDistinctCounts()
DialectsupportsTupleDistinctCounts in class Dialectpublic String getFromDual()
DialectgetFromDual in class Dialectfrom dual.public boolean supportsSelectQueryWithoutFromClause()
supportsSelectQueryWithoutFromClause in class Dialectprotected JdbcTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
DialectJdbcTypeDescriptor that should be used to handle the given JDBC type code. Returns
null if there is no override.getSqlTypeDescriptorOverride in class DialectsqlCode - A Types constant indicating the SQL column typeJdbcTypeDescriptor to use as an override, or null if there is no override.public String formatBinaryLiteral(byte[] bytes)
formatBinaryLiteral in class Dialectpublic SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
DialectSQLExceptionConversionDelegate 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 Dialectpublic UniqueDelegate getUniqueDelegate()
DialectgetUniqueDelegate in class Dialectpublic String getNotExpression(String expression)
DialectgetNotExpression in class Dialectexpression - The expression to negatepublic LimitHandler getLimitHandler()
DialectLimitHandler that implements support for
Query.setMaxResults(int) and
Query.setFirstResult(int) for
this dialect.getLimitHandler in class Dialectpublic boolean supportsNullPrecedence()
supportsNullPrecedence in class Dialectpublic SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Dialectnull
to use Hibernate's standard translator.getSqlAstTranslatorFactory in class DialectStandardSqlAstTranslatorFactory,
JdbcEnvironment.getSqlAstTranslatorFactory()public String renderOrderByElement(String expression, String collation, String order, NullPrecedence nullPrecedence)
renderOrderByElement in class Dialectexpression - The SQL order expression. In case of @OrderBy annotation user receives property placeholder
(e.g. attribute name enclosed in '{' and '}' signs).collation - Collation string in format collate IDENTIFIER, or null
if expression has not been explicitly specified.order - Order direction. Possible values: asc, desc, or null
if expression has not been explicitly specified.nullPrecedence - Nulls precedence. Default value: NullPrecedence.NONE.public IdentityColumnSupport getIdentityColumnSupport()
DialectIdentityColumnSupportgetIdentityColumnSupport in class Dialectpublic boolean supportsValuesList()
DialectsupportsValuesList in class Dialecttrue if VALUES list are supportedpublic boolean supportsRowValueConstructorSyntaxInInList()
Dialectrow values,
does it offer such support in IN lists as well?
For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."supportsRowValueConstructorSyntaxInInList in class Dialectpublic boolean supportsPartitionBy()
DialectsupportsPartitionBy in class Dialectpublic boolean supportsNonQueryWithCTE()
DialectsupportsNonQueryWithCTE in class Dialecttrue if non-query statements are supported with CTEpublic boolean supportsOffsetInSubquery()
DialectsupportsOffsetInSubquery in class Dialectpublic boolean supportsWindowFunctions()
DialectsupportsWindowFunctions in class Dialecttrue if the underlying database supports window functions,
false otherwise. The default is false.public GroupBySummarizationRenderingStrategy getGroupBySummarizationRenderingStrategy()
DialectgetGroupBySummarizationRenderingStrategy in class Dialectpublic GroupByConstantRenderingStrategy getGroupByConstantRenderingStrategy()
DialectgetGroupByConstantRenderingStrategy in class Dialectpublic String translateDatetimeFormat(String format)
DialectDateTimeFormatter 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 Dialectpublic String translateExtractField(TemporalUnit unit)
Dialectextract() function,
or of this dialect's equivalent
function.
This method does not need to handle
TemporalUnit.NANOSECOND,
TemporalUnit.NATIVE,
TemporalUnit.OFFSET,
TemporalUnit.DATE,
TemporalUnit.TIME,
TemporalUnit.WEEK_OF_YEAR, nor
TemporalUnit.WEEK_OF_MONTH,
which are already desugared by
ExtractFunction.
translateExtractField in class Dialectpublic String toBooleanValueString(boolean bool)
DialecttoBooleanValueString in class Dialectbool - The boolean valuepublic String extractPattern(TemporalUnit unit)
Dialectextract() function call. The resulting
pattern must contain ?1 and ?2 placeholders
for the arguments.
This method does not need to handle
TemporalUnit.NANOSECOND,
TemporalUnit.NATIVE,
TemporalUnit.OFFSET,
TemporalUnit.DATE,
TemporalUnit.TIME,
TemporalUnit.WEEK_OF_YEAR, or
TemporalUnit.WEEK_OF_MONTH,
which are already desugared by
ExtractFunction.
extractPattern in class Dialectunit - the first argumentCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.