public class OracleDialect extends Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl
Modifier and Type | Field and Description |
---|---|
static String |
PREFER_LONG_RAW |
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 |
---|
OracleDialect() |
OracleDialect(DialectResolutionInfo info) |
OracleDialect(int version) |
Modifier and Type | Method and Description |
---|---|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
boolean |
canCreateSchema()
Does this dialect support schema creation?
|
String |
castPattern(CastType from,
CastType to)
Oracle doesn't have any sort of
Types.BOOLEAN
type or Types.TIME type, and its default behavior
for casting dates and timestamps to and from strings is just awful. |
void |
contributeTypes(TypeContributions typeContributions,
ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
|
CaseFragment |
createCaseFragment()
Map case support to the Oracle DECODE function.
|
JoinFragment |
createOuterJoinFragment()
Create a
JoinFragment strategy responsible
for handling this dialect's variations in how joins are handled. |
String |
currentDate()
Translation of the HQL/JPQL
current_date function, which
maps to the Java type java.sql.Date , and of the HQL
local_date function which maps to the Java type
java.sql.LocalDate . |
String |
currentLocalTime()
Translation of the HQL
local_time function, which maps to
the Java type java.time.LocalTime which is a time with no
time zone. |
String |
currentLocalTimestamp()
Translation of the HQL
local_datetime function, which maps
to the Java type java.time.LocalDateTime which is a datetime
with no time zone. |
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. |
static Replacer |
datetimeFormat(String format,
boolean useFm,
boolean resetFm) |
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
String |
extractPattern(TemporalUnit unit)
Oracle supports a limited list of temporal fields in the
extract() function, but we can emulate some of them by
using to_char() with a format string instead of extract().
|
boolean |
forceLobAsLastValue()
HHH-4635
Oracle expects all Lob values to be last in inserts and updates.
|
String |
formatBinaryLiteral(byte[] bytes) |
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).
|
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 |
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 |
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.
|
String |
getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the
current timestamp.
|
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.
|
long |
getFractionalSecondPrecisionInNanos()
We minimize multiplicative factors by using seconds
(with fractional part) as the "native" precision for
duration arithmetic.
|
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 |
int |
getInExpressionCountLimit()
Return the limit that the underlying database places on the number of elements in an
IN predicate. |
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.
|
String |
getNativeIdentifierGeneratorStrategy()
Resolves the native generation strategy associated to this dialect.
|
String |
getNotExpression(String expression)
Negate an expression
|
int |
getPreferredSqlTypeCodeForBoolean()
The JDBC
type code to use for mapping
properties of Java type boolean . |
String |
getQueryHintString(String sql,
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.
|
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)
Given a
Types type code, determine an appropriate
null value to use in a select clause. |
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.
|
String |
getTableAliasSeparator()
The separator to use between a table name and its alias in a SQL
query, typically either
" as " where the spaces are
required, or a space character " " . |
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 |
isEmptyStringTreatedAsNull()
Return whether the dialect considers an empty-string value as null.
|
protected void |
registerBinaryTypeMappings() |
protected void |
registerCharacterTypeMappings() |
protected void |
registerDateTimeTypeMappings() |
protected void |
registerDefaultProperties() |
protected void |
registerNumericTypeMappings() |
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*. |
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 void |
registerReverseHibernateTypeMappings() |
JdbcTypeDescriptor |
resolveSqlTypeDescriptor(int jdbcTypeCode,
int precision,
int scale,
JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry) |
boolean |
supportsBitType()
Oracle has neither
BIT nor BOOLEAN . |
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 |
supportsFetchClause(FetchClauseType type)
Does this dialect support the given fetch clause type.
|
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 |
supportsPartitionBy()
Does the underlying database support partition by
|
boolean |
supportsRowValueConstructorSyntaxInInList()
HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this
method here.
|
boolean |
supportsRowValueConstructorSyntaxInInSubquery() |
boolean |
supportsSelectQueryWithoutFromClause() |
boolean |
supportsSkipLocked()
Does this dialect/database support SKIP_LOCKED timeout.
|
boolean |
supportsTimezoneTypes()
Whether the Dialect supports timezone types like
Types.TIMESTAMP_WITH_TIMEZONE . |
boolean |
supportsTupleDistinctCounts()
Does this dialect support `count(distinct a,b)`?
|
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 |
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). |
boolean |
useFollowOnLocking(String sql,
QueryOptions queryOptions)
For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, binaryToDecimalPrecision, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, closeQuote, convertToFirstRowValue, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, formatAsTimestamp, formatAsTimestamp, formatAsTimestamp, formatDateTimeLiteral, formatDateTimeLiteral, formatDateTimeLiteral, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDialect, getDialect, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getEnumCheckCondition, getFloatPrecision, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getKeywords, getLimitString, getLimitString, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getNullOrdering, getQueryHintString, getRawTypeName, getRawTypeName, getReadRowLockStrategy, getSchemaNameResolver, getSelectSequenceNextValString, getSequenceExporter, getSequenceNextValString, getSequenceNextValString, getSizeStrategy, getSqlTypeDescriptorOverride, getSqmTranslatorFactory, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerHibernateType, registerHibernateType, registerKeyword, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresFloatCastingOfIntegerDivision, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsFractionalTimestampArithmetic, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsJdbcConnectionLobCreation, supportsLimit, supportsLimitOffset, supportsLobValueChangePropagation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSequences, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsValuesListForInsert, supportsVariableLimit, supportsWait, toBooleanValueString, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, useInputStreamToInsertBlob, useMaxForLimit, wrapDateLiteral, wrapTimeLiteral, wrapTimestampLiteral
public static final String PREFER_LONG_RAW
public OracleDialect(DialectResolutionInfo info)
public OracleDialect()
public OracleDialect(int version)
public int getVersion()
getVersion
in class Dialect
public int getPreferredSqlTypeCodeForBoolean()
Dialect
type code
to use for mapping
properties of Java type boolean
.
Usually Types.BOOLEAN
or Types.BIT
.
getPreferredSqlTypeCodeForBoolean
in class Dialect
Types
.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 currentDate()
Dialect
current_date
function, which
maps to the Java type java.sql.Date
, and of the HQL
local_date
function which maps to the Java type
java.sql.LocalDate
.currentDate
in class Dialect
public String currentTime()
Dialect
current_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 Dialect
public String currentTimestamp()
Dialect
current_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 Dialect
public String currentLocalTime()
Dialect
local_time
function, which maps to
the Java type java.time.LocalTime
which is a time with no
time zone. It should usually be the same SQL function as for
Dialect.currentTime()
.
It is recommended to override this in dialects for databases which
support localtime
or current_time at local
.
currentLocalTime
in class Dialect
public String currentLocalTimestamp()
Dialect
local_datetime
function, which maps
to the Java type java.time.LocalDateTime
which is a datetime
with no time zone. It should usually be the same SQL function as for
Dialect.currentTimestamp()
.
It is recommended to override this in dialects for databases which
support localtimestamp
or current_timestamp at local
.
currentLocalTimestamp
in class Dialect
public String currentTimestampWithTimeZone()
Dialect
offset_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 Dialect
public String castPattern(CastType from, CastType to)
Types.BOOLEAN
type or Types.TIME
type, and its default behavior
for casting dates and timestamps to and from strings is just awful.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 long getFractionalSecondPrecisionInNanos()
getFractionalSecondPrecisionInNanos
in class Dialect
TemporalUnit.NATIVE
public String extractPattern(TemporalUnit unit)
TemporalUnit.DAY_OF_YEAR
,
TemporalUnit.DAY_OF_MONTH
,
TemporalUnit.DAY_OF_YEAR
,
and TemporalUnit.WEEK
.extractPattern
in class Dialect
unit
- the first argumentpublic 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 isprotected void registerCharacterTypeMappings()
protected void registerNumericTypeMappings()
protected void registerDateTimeTypeMappings()
public boolean supportsTimezoneTypes()
Dialect
Types.TIMESTAMP_WITH_TIMEZONE
.supportsTimezoneTypes
in class Dialect
protected void registerBinaryTypeMappings()
protected void registerReverseHibernateTypeMappings()
protected void registerDefaultProperties()
public JdbcTypeDescriptor resolveSqlTypeDescriptor(int jdbcTypeCode, int precision, int scale, JdbcTypeDescriptorRegistry jdbcTypeDescriptorRegistry)
resolveSqlTypeDescriptor
in class Dialect
public boolean supportsBitType()
BIT
nor BOOLEAN
.supportsBitType
in class Dialect
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Dialect
contributeTypes
in class Dialect
typeContributions
- Callback to contribute the typesserviceRegistry
- The service registrypublic String getNativeIdentifierGeneratorStrategy()
Dialect
getNativeIdentifierGeneratorStrategy
in class Dialect
public String getTableAliasSeparator()
Dialect
" as "
where the spaces are
required, or a space character " "
.getTableAliasSeparator
in class Dialect
public IdentityColumnSupport getIdentityColumnSupport()
Dialect
IdentityColumnSupport
getIdentityColumnSupport
in class Dialect
public JoinFragment createOuterJoinFragment()
Dialect
JoinFragment
strategy responsible
for handling this dialect's variations in how joins are handled.createOuterJoinFragment
in class Dialect
JoinFragment
strategy.public String getCrossJoinSeparator()
Dialect
" cross join "
or a comma ", "
,
where the spaces are required.getCrossJoinSeparator
in class Dialect
public CaseFragment createCaseFragment()
CaseFragment
strategy responsible
for handling this dialect's variations in how CASE statements are
handled.createCaseFragment
in class Dialect
CaseFragment
strategy.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 getSelectClauseNullString(int sqlType)
Dialect
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 Dialect
sqlType
- The Types
type code.public String getCurrentTimestampSelectString()
Dialect
getCurrentTimestampSelectString
in class Dialect
public String getCurrentTimestampSQLFunctionName()
Dialect
getCurrentTimestampSQLFunctionName
in class Dialect
public String getAddColumnString()
Dialect
getAddColumnString
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 boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
public String getFromDual()
Dialect
getFromDual
in class Dialect
from dual
.public boolean supportsSelectQueryWithoutFromClause()
supportsSelectQueryWithoutFromClause
in class Dialect
public SequenceSupport getSequenceSupport()
getSequenceSupport
in class Dialect
public String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public SequenceInformationExtractor getSequenceInformationExtractor()
Dialect
SequenceInformation
.getSequenceInformationExtractor
in class Dialect
public String getSelectGUIDString()
Dialect
getSelectGUIDString
in class Dialect
public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
getViolatedConstraintNameExtractor
in interface ConversionContext
getViolatedConstraintNameExtractor
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 int registerResultSetOutParameter(CallableStatement statement, int col) 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.col
- The bind position at which to register the output param.SQLException
- Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
Dialect
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.getResultSet
in class Dialect
ps
- The callable statement.SQLException
- Indicates problems extracting the result set.public boolean supportsCommentOn()
Dialect
supportsCommentOn
in class Dialect
true
if commenting is supportedpublic boolean supportsCurrentTimestampSelection()
Dialect
supportsCurrentTimestampSelection
in class Dialect
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.public boolean supportsEmptyInList()
Dialect
supportsEmptyInList
in class Dialect
public boolean supportsExistsInSelect()
Dialect
supportsExistsInSelect
in class Dialect
public GroupBySummarizationRenderingStrategy getGroupBySummarizationRenderingStrategy()
Dialect
getGroupBySummarizationRenderingStrategy
in class Dialect
public GroupByConstantRenderingStrategy getGroupByConstantRenderingStrategy()
Dialect
getGroupByConstantRenderingStrategy
in class Dialect
public int getInExpressionCountLimit()
Dialect
IN
predicate.
If the database defines no such limits, simply return zero or less-than-zero.getInExpressionCountLimit
in class Dialect
public boolean forceLobAsLastValue()
Dialect
forceLobAsLastValue
in class Dialect
public boolean isEmptyStringTreatedAsNull()
Dialect
isEmptyStringTreatedAsNull
in class Dialect
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
getFallbackSqmMutationStrategy
in class Dialect
public boolean useFollowOnLocking(String sql, QueryOptions queryOptions)
useFollowOnLocking
in class Dialect
true
indicates that the dialect requests that locking be applied by subsequent select;
false
(the default) indicates that locking should be applied to the main SQL statement..public String getNotExpression(String expression)
Dialect
getNotExpression
in class Dialect
expression
- The expression to negatepublic String getQueryHintString(String sql, String hints)
Dialect
getQueryHintString
in class Dialect
sql
- The query to which to apply the hint.hints
- The hints to applypublic int getMaxAliasLength()
Dialect
getMaxAliasLength
in class Dialect
public CallableStatementSupport getCallableStatementSupport()
getCallableStatementSupport
in class Dialect
public boolean canCreateSchema()
Dialect
canCreateSchema
in class Dialect
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 boolean supportsPartitionBy()
Dialect
supportsPartitionBy
in class Dialect
public boolean supportsRowValueConstructorSyntaxInInList()
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 boolean supportsRowValueConstructorSyntaxInInSubquery()
supportsRowValueConstructorSyntaxInInSubquery
in class Dialect
public boolean supportsTupleDistinctCounts()
Dialect
supportsTupleDistinctCounts
in class Dialect
public boolean supportsOffsetInSubquery()
Dialect
supportsOffsetInSubquery
in class Dialect
public boolean supportsFetchClause(FetchClauseType type)
Dialect
supportsFetchClause
in class Dialect
type
- The fetch clause typetrue
if the underlying database supports the given fetch clause type,
false
otherwise. The default is false
.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 supportsSkipLocked()
Dialect
supportsSkipLocked
in class Dialect
true
if SKIP_LOCKED is supportedpublic boolean forUpdateOfColumns()
Dialect
forUpdateOfColumns
in class Dialect
public RowLockStrategy getWriteRowLockStrategy()
Dialect
getWriteRowLockStrategy
in class Dialect
public String getForUpdateNowaitString()
Dialect
getForUpdateNowaitString
in class Dialect
public String getForUpdateString(String aliases)
Dialect
getForUpdateString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateNowaitString(String aliases)
Dialect
getForUpdateNowaitString
in class Dialect
aliases
- The columns to be write locked.public String getForUpdateSkipLockedString()
Dialect
getForUpdateSkipLockedString
in class Dialect
public String getForUpdateSkipLockedString(String aliases)
Dialect
getForUpdateSkipLockedString
in class Dialect
aliases
- The columns to be write locked.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 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 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 String formatBinaryLiteral(byte[] bytes)
formatBinaryLiteral
in class Dialect
public ResultSet getResultSet(CallableStatement statement, int position) throws SQLException
Dialect
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
.getResultSet
in class Dialect
statement
- The callable statement.position
- The bind position at which to register the output param.SQLException
- Indicates problems extracting the result set.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 ResultSet getResultSet(CallableStatement statement, String name) throws SQLException
Dialect
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.getResultSet
in class Dialect
statement
- The callable statement.name
- The parameter name (for drivers which support named parameters).SQLException
- Indicates problems extracting the result set.Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.