public class PostgreSQLDialect 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 |
|---|
PostgreSQLDialect() |
PostgreSQLDialect(DialectResolutionInfo info) |
PostgreSQLDialect(int version) |
| Modifier and Type | Method and Description |
|---|---|
void |
augmentRecognizedTableTypes(List<String> tableTypesList) |
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. |
void |
contributeTypes(TypeContributions typeContributions,
ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
|
String |
currentTime()
Translation of the HQL/JPQL
current_time function, which
maps to the Java type java.sql.Time which is a time with
no time zone. |
String |
currentTimestamp()
Translation of the HQL/JPQL
current_timestamp function,
which maps to the Java type java.sql.Timestamp which is
a datetime with no time zone. |
String |
currentTimestampWithTimeZone()
Translation of the HQL
offset_datetime function, which maps
to the Java type java.time.OffsetDateTime which is a datetime
with a time zone. |
Replacer |
datetimeFormat(String format) |
protected void |
extractField(StringBuilder pattern,
TemporalUnit unit,
TemporalType fromTimestamp,
TemporalType toTimestamp,
TemporalUnit toUnit) |
String |
extractPattern(TemporalUnit unit)
The
extract() function returns TemporalUnit.DAY_OF_WEEK
numbered from 0 to 6. |
String |
formatBinaryLiteral(byte[] bytes) |
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 |
getCaseInsensitiveLike()
The name of the SQL function that can do case insensitive like comparison.
|
String |
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the
database.
|
SqmMultiTableMutationStrategy |
getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor,
RuntimeModelCreationContext runtimeModelCreationContext) |
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 |
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(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.
|
long |
getFractionalSecondPrecisionInNanos()
microsecond is the smallest unit for an interval,
and the highest precision for a timestamp, so we could
use it as the "native" precision, but it's more convenient to use
whole seconds (with the fractional part), since we want to use
extract(epoch from ...) in our emulation of
timestampdiff(). |
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. |
NationalizationSupport |
getNationalizationSupport() |
String |
getNativeIdentifierGeneratorStrategy()
Resolves the native generation strategy associated to this dialect.
|
String |
getNoColumnsInsertString()
The fragment used to insert a row without specifying any column values.
|
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.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
ResultSet |
getResultSet(CallableStatement statement,
int position)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet. |
ResultSet |
getResultSet(CallableStatement statement,
String name)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
String |
getSelectClauseNullString(int sqlType)
Workaround for postgres bug #1453
Given a
Types type code, determine an appropriate
null value to use in a select clause. |
SequenceSupport |
getSequenceSupport() |
SqlAstTranslatorFactory |
getSqlAstTranslatorFactory()
Return an SqlAstTranslatorFactory specific for the Dialect.
|
JdbcTypeDescriptor |
getSqlTypeDescriptorOverride(int sqlCode)
Returns the
JdbcTypeDescriptor that should be used to handle the given JDBC type code. |
int |
getVersion() |
ViolatedConstraintNameExtractor |
getViolatedConstraintNameExtractor() |
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 |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
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*. |
boolean |
requiresParensForTupleDistinctCounts()
If
Dialect.supportsTupleDistinctCounts() is true, does the Dialect require the tuple to be wrapped with parens? |
boolean |
supportsCaseInsensitiveLike()
Does this dialect support case insensitive LIKE restrictions?
|
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 |
supportsFetchClause(FetchClauseType type)
Does this dialect support the given fetch clause type.
|
boolean |
supportsIfExistsAfterAlterTable()
For an "alter table", can the phrase "if exists" be applied?
|
boolean |
supportsIfExistsBeforeConstraintName()
For dropping a constraint with an "alter table", can the phrase "if exists" be applied before the constraint name?
NOTE : Only one or the other (or neither) of this and
Dialect.supportsIfExistsAfterConstraintName() should return true |
boolean |
supportsIfExistsBeforeTableName()
For dropping a table, can the phrase "if exists" be applied before the table name?
NOTE : Only one or the other (or neither) of this and
Dialect.supportsIfExistsAfterTableName() should return true |
boolean |
supportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData)
Check whether the JDBC
Connection supports creating LOBs via Connection.createBlob(),
Connection.createNClob() or Connection.createClob(). |
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 |
supportsNonQueryWithCTE()
Does this dialect/database support non-query statements (e.g.
|
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 |
supportsOuterJoinForUpdate()
Does this dialect support FOR UPDATE in conjunction with
outer joined rows?
|
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 |
supportsRowValueConstructorSyntaxInQuantifiedPredicates()
Is this dialect known to support what ANSI-SQL terms "row value
constructor" syntax; sometimes called tuple syntax with quantified predicates.
|
boolean |
supportsSelectAliasInGroupByClause() |
boolean |
supportsSkipLocked()
Does this dialect/database support SKIP_LOCKED timeout.
|
boolean |
supportsTimezoneTypes()
Whether the Dialect supports timezone types like
Types.TIMESTAMP_WITH_TIMEZONE. |
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 |
supportsValuesList()
Does this dialect/database support VALUES list (e.g.
|
boolean |
supportsWait()
Does this dialect/database support WAIT timeout.
|
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. |
boolean |
useInputStreamToInsertBlob()
Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
|
protected String |
wrapDateLiteral(String date) |
protected String |
wrapTimeLiteral(String time) |
protected String |
wrapTimestampLiteral(String timestamp) |
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, binaryToDecimalPrecision, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, castPattern, closeQuote, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, currentDate, currentLocalTime, currentLocalTimestamp, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, formatAsTimestamp, formatAsTimestamp, formatAsTimestamp, formatDateTimeLiteral, formatDateTimeLiteral, formatDateTimeLiteral, forUpdateOfColumns, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDialect, getDialect, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getEnumCheckCondition, getFloatPrecision, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getFromDual, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNotExpression, getNullColumnString, getNullColumnString, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getQueryHintString, getRawTypeName, getRawTypeName, getReadRowLockStrategy, getSchemaNameResolver, getSelectGUIDString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSequenceNextValString, getSizeStrategy, getSqmTranslatorFactory, getTableAliasSeparator, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, quote, registerColumnType, registerColumnType, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresFloatCastingOfIntegerDivision, resolveSqlTypeDescriptor, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFractionalTimestampArithmetic, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsLimit, supportsLimitOffset, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNotNullUnique, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInSubquery, supportsRowValueConstructorSyntaxInSet, supportsSelectQueryWithoutFromClause, supportsSequences, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnionAll, supportsUnionInSubquery, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesListForInsert, supportsVariableLimit, toString, transformSelectString, translateDurationField, trimPattern, useFollowOnLocking, useMaxForLimitpublic PostgreSQLDialect(DialectResolutionInfo info)
public PostgreSQLDialect()
public PostgreSQLDialect(int version)
public int getVersion()
getVersion in class Dialectpublic String currentTime()
Dialectcurrent_time function, which
maps to the Java type java.sql.Time which is a time with
no time zone. This contradicts ANSI SQL where current_time
has the type TIME WITH TIME ZONE.
It is recommended to override this in dialects for databases which
support localtime or time at local.
currentTime in class Dialectpublic String currentTimestamp()
Dialectcurrent_timestamp function,
which maps to the Java type java.sql.Timestamp which is
a datetime with no time zone. This contradicts ANSI SQL where
current_timestamp has the type
TIMESTAMP WITH TIME ZONE.
It is recommended to override this in dialects for databases which
support localtimestamp or timestamp at local.
currentTimestamp in class Dialectpublic String currentTimestampWithTimeZone()
Dialectoffset_datetime function, which maps
to the Java type java.time.OffsetDateTime which is a datetime
with a time zone. This in principle correctly maps to the ANSI SQL
current_timestamp which has the type
TIMESTAMP WITH TIME ZONE.currentTimestampWithTimeZone in class Dialectpublic String extractPattern(TemporalUnit unit)
extract() function returns TemporalUnit.DAY_OF_WEEK
numbered from 0 to 6. This isn't consistent with what most other
databases do, so here we adjust the result by generating
(extract(dow,arg)+1)).extractPattern in class Dialectunit - the first argumentpublic long getFractionalSecondPrecisionInNanos()
microsecond is the smallest unit for an interval,
and the highest precision for a timestamp, so we could
use it as the "native" precision, but it's more convenient to use
whole seconds (with the fractional part), since we want to use
extract(epoch from ...) in our emulation of
timestampdiff().getFractionalSecondPrecisionInNanos in class DialectTemporalUnit.NATIVEpublic 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 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 isprotected void extractField(StringBuilder pattern, TemporalUnit unit, TemporalType fromTimestamp, TemporalType toTimestamp, TemporalUnit toUnit)
public boolean supportsTimezoneTypes()
DialectTypes.TIMESTAMP_WITH_TIMEZONE.supportsTimezoneTypes in class Dialectpublic void initializeFunctionRegistry(QueryEngine queryEngine)
DialectinitializeFunctionRegistry in class Dialectpublic 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 boolean supportsIfExistsBeforeTableName()
DialectDialect.supportsIfExistsAfterTableName() should return truesupportsIfExistsBeforeTableName in class Dialecttrue if the "if exists" can be applied before the table namepublic boolean supportsIfExistsBeforeConstraintName()
DialectDialect.supportsIfExistsAfterConstraintName() should return truesupportsIfExistsBeforeConstraintName in class Dialecttrue if the "if exists" can be applied before the constraint namepublic boolean supportsIfExistsAfterAlterTable()
DialectsupportsIfExistsAfterAlterTable in class Dialecttrue if the "if exists" can be applied after ALTER TABLEpublic 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 SequenceSupport getSequenceSupport()
getSequenceSupport in class Dialectpublic String getCascadeConstraintsString()
Dialectdrop 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 Dialectpublic String getQuerySequencesString()
DialectgetQuerySequencesString in class DialectSchemaUpdatepublic LimitHandler getLimitHandler()
DialectLimitHandler that implements support for
Query.setMaxResults(int) and
Query.setFirstResult(int) for
this dialect.getLimitHandler in class Dialectpublic String getForUpdateString(String aliases)
DialectgetForUpdateString in class Dialectaliases - The columns to be write locked.public String getForUpdateString(String aliases, LockOptions lockOptions)
DialectgetForUpdateString in class Dialectaliases - The columns to be write locked.lockOptions - the lock options to applypublic String getNoColumnsInsertString()
DialectgetNoColumnsInsertString in class Dialectpublic String getCaseInsensitiveLike()
DialectgetCaseInsensitiveLike in class Dialectpublic boolean supportsCaseInsensitiveLike()
DialectsupportsCaseInsensitiveLike in class Dialecttrue if the underlying database supports case insensitive like comparison,
false otherwise. The default is false.public String getNativeIdentifierGeneratorStrategy()
DialectgetNativeIdentifierGeneratorStrategy in class Dialectpublic boolean supportsOuterJoinForUpdate()
DialectsupportsOuterJoinForUpdate in class Dialectpublic boolean useInputStreamToInsertBlob()
DialectPreparedStatement.setBinaryStream(int, java.io.InputStream, int)).useInputStreamToInsertBlob in class Dialectpublic String getSelectClauseNullString(int sqlType)
Types 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 boolean supportsCommentOn()
DialectsupportsCommentOn in class Dialecttrue if commenting is supportedpublic boolean supportsCurrentTimestampSelection()
DialectsupportsCurrentTimestampSelection 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 String getCurrentTimestampSelectString()
DialectgetCurrentTimestampSelectString in class Dialectpublic boolean requiresParensForTupleDistinctCounts()
DialectDialect.supportsTupleDistinctCounts() is true, does the Dialect require the tuple to be wrapped with parens?requiresParensForTupleDistinctCounts in class Dialectpublic String toBooleanValueString(boolean bool)
DialecttoBooleanValueString in class Dialectbool - The boolean valuepublic IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException
Dialectnull 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 Dialectbuilder - A semi-configured IdentifierHelper builder.dbMetaData - Access to the metadata returned from the driver if needed and if available. WARNING: may be nullnull to indicate Hibernate should use its fallback pathSQLException - Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.Dialect.getNameQualifierSupport()public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
getFallbackSqmMutationStrategy in class Dialectpublic SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Dialectnull
to use Hibernate's standard translator.getSqlAstTranslatorFactory in class DialectStandardSqlAstTranslatorFactory,
JdbcEnvironment.getSqlAstTranslatorFactory()public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
getViolatedConstraintNameExtractor in interface ConversionContextgetViolatedConstraintNameExtractor 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 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 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 supportsUnboundedLobLocatorMaterialization()
DialectDialect.supportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction...supportsUnboundedLobLocatorMaterialization in class Dialectpublic boolean supportsRowValueConstructorSyntax()
DialectsupportsRowValueConstructorSyntax in class Dialectpublic boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()
DialectsupportsRowValueConstructorSyntaxInQuantifiedPredicates in class Dialectpublic boolean supportsSelectAliasInGroupByClause()
supportsSelectAliasInGroupByClause in class Dialectpublic CallableStatementSupport getCallableStatementSupport()
getCallableStatementSupport in class Dialectpublic ResultSet getResultSet(CallableStatement statement, int position) throws SQLException
DialectDialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet.getResultSet in class Dialectstatement - The callable statement.position - The bind position at which to register the output param.SQLException - Indicates problems extracting the result set.public ResultSet getResultSet(CallableStatement statement, String name) throws SQLException
DialectDialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.getResultSet in class Dialectstatement - The callable statement.name - The parameter name (for drivers which support named parameters).SQLException - Indicates problems extracting the result set.public boolean qualifyIndexName()
DialectqualifyIndexName in class Dialectpublic IdentityColumnSupport getIdentityColumnSupport()
DialectIdentityColumnSupportgetIdentityColumnSupport in class Dialectpublic NationalizationSupport getNationalizationSupport()
getNationalizationSupport in class Dialectpublic boolean supportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData)
DialectConnection supports creating LOBs via Connection.createBlob(),
Connection.createNClob() or Connection.createClob().supportsJdbcConnectionLobCreation in class DialectdatabaseMetaData - 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 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 formatBinaryLiteral(byte[] bytes)
formatBinaryLiteral in class Dialectprotected String wrapDateLiteral(String date)
wrapDateLiteral in class Dialectprotected String wrapTimeLiteral(String time)
wrapTimeLiteral in class Dialectprotected String wrapTimestampLiteral(String timestamp)
wrapTimestampLiteral in class Dialectpublic String getWriteLockString(int timeout)
DialectgetWriteLockString in class Dialecttimeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getWriteLockString(String aliases, int timeout)
DialectgetWriteLockString in class Dialectaliases - The columns to be read locked.timeout - 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 String getReadLockString(String aliases, int timeout)
DialectgetReadLockString in class Dialectaliases - The columns to be read locked.timeout - in milliseconds, -1 for indefinite wait and 0 for no wait.public String getForUpdateNowaitString()
DialectgetForUpdateNowaitString in class Dialectpublic String getForUpdateNowaitString(String aliases)
DialectgetForUpdateNowaitString in class Dialectaliases - The columns to be write locked.public String getForUpdateSkipLockedString()
DialectgetForUpdateSkipLockedString in class Dialectpublic String getForUpdateSkipLockedString(String aliases)
DialectgetForUpdateSkipLockedString in class Dialectaliases - The columns to be write locked.public boolean supportsNoWait()
DialectsupportsNoWait in class Dialecttrue if NO_WAIT is supportedpublic boolean supportsWait()
DialectsupportsWait in class Dialecttrue if WAIT is supportedpublic boolean supportsSkipLocked()
DialectsupportsSkipLocked in class Dialecttrue if SKIP_LOCKED is supportedpublic 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 boolean supportsFetchClause(FetchClauseType type)
DialectsupportsFetchClause in class Dialecttype - The fetch clause typetrue if the underlying database supports the given fetch clause type,
false otherwise. The default is false.public RowLockStrategy getWriteRowLockStrategy()
DialectgetWriteRowLockStrategy in class Dialectpublic GroupBySummarizationRenderingStrategy getGroupBySummarizationRenderingStrategy()
DialectgetGroupBySummarizationRenderingStrategy in class Dialectpublic GroupByConstantRenderingStrategy getGroupByConstantRenderingStrategy()
DialectgetGroupByConstantRenderingStrategy in class Dialectpublic void augmentRecognizedTableTypes(List<String> tableTypesList)
augmentRecognizedTableTypes in class Dialectpublic void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
DialectcontributeTypes in class DialecttypeContributions - Callback to contribute the typesserviceRegistry - The service registryCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.