public class Oracle8iDialect extends Dialect
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 |
---|
Oracle8iDialect()
Constructs an Oracle8iDialect
|
Modifier and Type | Method and Description |
---|---|
boolean |
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
boolean |
canCreateSchema()
Does this dialect support schema creation?
|
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. |
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
boolean |
forceLobAsLastValue()
HHH-4635
Oracle expects all Lob values to be last in inserts and updates.
|
boolean |
forUpdateOfColumns()
Is FOR UPDATE OF syntax supported?
|
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
String |
getBasicSelectClauseNullString(int sqlType)
Allows access to the basic
Dialect.getSelectClauseNullString(int)
implementation... |
CallableStatementSupport |
getCallableStatementSupport() |
String |
getCascadeConstraintsString()
Completely optional cascading drop clause
|
String |
getCreateSequenceString(String sequenceName)
Typically dialects which support sequences can create a sequence
with a single command.
|
protected String |
getCreateSequenceString(String sequenceName,
int initialValue,
int incrementSize)
Overloaded form of
Dialect.getCreateSequenceString(String) , additionally
taking the initial value and increment size to be applied to the sequence
definition. |
String |
getCrossJoinSeparator()
Returns the separator to use for defining cross joins when translating HQL queries.
|
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.
|
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
String |
getDropSequenceString(String sequenceName)
Typically dialects which support sequences can drop a sequence
with a single command.
|
String |
getForUpdateNowaitString()
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.
|
String |
getForUpdateNowaitString(String aliases)
Get the FOR UPDATE OF column_list NOWAIT fragment appropriate
for this dialect given the aliases of the columns to be write locked.
|
String |
getForUpdateString(String aliases)
Get the FOR UPDATE OF column_list fragment appropriate for this
dialect given the aliases of the columns to be write locked.
|
int |
getInExpressionCountLimit()
Return the limit that the underlying database places on the number of elements in an
IN predicate. |
LimitHandler |
getLimitHandler()
Returns the delegate managing LIMIT clause.
|
String |
getLimitString(String sql,
boolean hasOffset)
Apply a limit clause to the query.
|
int |
getMaxAliasLength()
What is the maximum length Hibernate can use for generated aliases?
The maximum here should account for the fact that Hibernate often needs to append "uniqueing" information
to the end of generated aliases.
|
String |
getNotExpression(String expression)
Negate an expression
|
String |
getQueryHintString(String sql,
String hints)
Apply a hint to the query.
|
String |
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.
|
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. |
String |
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.
|
String |
getSelectSequenceNextValString(String sequenceName)
Generate the select expression fragment that will retrieve the next
value of a sequence as part of another (typically DML) statement.
|
SequenceInformationExtractor |
getSequenceInformationExtractor() |
String |
getSequenceNextValString(String sequenceName)
Generate the appropriate select statement to to retrieve the next value
of a sequence.
|
protected SqlTypeDescriptor |
getSqlTypeDescriptorOverride(int sqlCode)
Returns the
SqlTypeDescriptor that should be used to handle the given JDBC type code. |
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter() |
boolean |
isCurrentTimestampSelectStringCallable()
Should the value returned by
Dialect.getCurrentTimestampSelectString()
be treated as callable. |
protected void |
registerCharacterTypeMappings() |
protected void |
registerDateTimeTypeMappings() |
protected void |
registerDefaultProperties() |
protected void |
registerFunctions() |
protected void |
registerLargeObjectTypeMappings() |
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*. |
protected void |
registerReverseHibernateTypeMappings() |
protected String |
statementType(String sql) |
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 |
supportsLimit()
Does this dialect support some form of limiting query results
via a SQL clause?
|
boolean |
supportsNoWait()
Does this dialect/database support NO_WAIT timeout.
|
boolean |
supportsPartitionBy()
Does the underlying database support partition by
|
boolean |
supportsPooledSequences()
Does this dialect support "pooled" sequences.
|
boolean |
supportsSequences()
Does this dialect support sequences?
|
boolean |
supportsUnionAll()
Does this dialect support UNION ALL, which is generally a faster
variant of UNION?
|
boolean |
useFollowOnLocking(QueryParameters parameters)
For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.
|
boolean |
useMaxForLimit()
Does the LIMIT clause take a "maximum" row number instead
of a total number of returned rows?
This is easiest understood via an example.
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnSupport, getIndexExporter, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSequenceExporter, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsJdbcConnectionLobCreation, supportsLimitOffset, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob
protected void registerCharacterTypeMappings()
protected void registerNumericTypeMappings()
protected void registerDateTimeTypeMappings()
protected void registerLargeObjectTypeMappings()
protected void registerReverseHibernateTypeMappings()
protected void registerFunctions()
protected void registerDefaultProperties()
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
Dialect
SqlTypeDescriptor
that should be used to handle the given JDBC type code. Returns
null
if there is no override.getSqlTypeDescriptorOverride
in class Dialect
sqlCode
- A Types
constant indicating the SQL column typeSqlTypeDescriptor
to use as an override, or null
if there is no override.public 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
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
getLimitHandler
in class Dialect
public String getLimitString(String sql, boolean hasOffset)
Dialect
variable
limit clauses when they support limits. Thus, when building the
select command we do not actually need to know the limit or the offset
since we will just be using placeholders.
Here we do still pass along whether or not an offset was specified
so that dialects not supporting offsets can generate proper exceptions.
In general, dialects will override one or the other of this method and
Dialect.getLimitString(String, int, int)
.getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?public String getBasicSelectClauseNullString(int sqlType)
Dialect.getSelectClauseNullString(int)
implementation...sqlType
- The Types
mapping type codepublic 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 getSequenceNextValString(String sequenceName)
Dialect
getSequenceNextValString
in class Dialect
sequenceName
- the name of the sequencepublic String getSelectSequenceNextValString(String sequenceName)
Dialect
Dialect.getSequenceNextValString(String)
in that this
should return an expression usable within another statement.getSelectSequenceNextValString
in class Dialect
sequenceName
- the name of the sequencepublic String getCreateSequenceString(String sequenceName)
Dialect
Dialect.getCreateSequenceStrings(java.lang.String)
to help facilitate that.
Dialects which support sequences and can create a sequence in a
single command need *only* override this method. Dialects
which support sequences but require multiple commands to create
a sequence should instead override Dialect.getCreateSequenceStrings(java.lang.String)
.getCreateSequenceString
in class Dialect
sequenceName
- The name of the sequenceprotected String getCreateSequenceString(String sequenceName, int initialValue, int incrementSize)
Dialect
Dialect.getCreateSequenceString(String)
, additionally
taking the initial value and increment size to be applied to the sequence
definition.
The default definition is to suffix Dialect.getCreateSequenceString(String)
with the string: " start with {initialValue} increment by {incrementSize}" where
{initialValue} and {incrementSize} are replacement placeholders. Generally
dialects should only need to override this method if different key phrases
are used to apply the allocation information.getCreateSequenceString
in class Dialect
sequenceName
- The name of the sequenceinitialValue
- The initial value to apply to 'create sequence' statementincrementSize
- The increment value to apply to 'create sequence' statementpublic String getDropSequenceString(String sequenceName)
Dialect
Dialect.getDropSequenceStrings(java.lang.String)
to help facilitate that.
Dialects which support sequences and can drop a sequence in a
single command need *only* override this method. Dialects
which support sequences but require multiple commands to drop
a sequence should instead override Dialect.getDropSequenceStrings(java.lang.String)
.getDropSequenceString
in class Dialect
sequenceName
- The name of the sequencepublic String getCascadeConstraintsString()
Dialect
getCascadeConstraintsString
in class Dialect
public boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
public String getForUpdateNowaitString()
Dialect
getForUpdateNowaitString
in class Dialect
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public boolean supportsPooledSequences()
Dialect
supportsPooledSequences
in class Dialect
Dialect.getCreateSequenceStrings(String, int, int)
,
Dialect.getCreateSequenceString(String, int, int)
public boolean supportsLimit()
Dialect
supportsLimit
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 boolean bindLimitParametersInReverseOrder()
Dialect
bindLimitParametersInReverseOrder
in class Dialect
public boolean useMaxForLimit()
Dialect
useMaxForLimit
in class Dialect
public boolean forUpdateOfColumns()
Dialect
forUpdateOfColumns
in class Dialect
public String getQuerySequencesString()
Dialect
getQuerySequencesString
in class Dialect
SchemaUpdate
public SequenceInformationExtractor getSequenceInformationExtractor()
getSequenceInformationExtractor
in class Dialect
public String getSelectGUIDString()
Dialect
getSelectGUIDString
in class Dialect
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter
in interface ConversionContext
getViolatedConstraintNameExtracter
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 supportsUnionAll()
Dialect
supportsUnionAll
in class Dialect
public boolean supportsCommentOn()
Dialect
supportsCommentOn
in class Dialect
true
if commenting is supportedpublic MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy
in class Dialect
public 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 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 useFollowOnLocking(QueryParameters parameters)
useFollowOnLocking
in class Dialect
parameters
- 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 supportsNoWait()
Dialect
supportsNoWait
in class Dialect
true
if NO_WAIT is supportedCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.