Package org.hibernate.dialect
Class Oracle8iDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.Oracle8iDialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
Oracle9iDialect
public class Oracle8iDialect extends Dialect
A dialect for Oracle 8i.
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.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
-
-
Constructor Summary
Constructors Constructor Description Oracle8iDialect()
Constructs a Oracle8iDialect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
bindLimitParametersInReverseOrder()
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit.SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()
Build an instance of aSQLExceptionConversionDelegate
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 aJoinFragment
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?java.lang.String
getAddColumnString()
The syntax used to add a column to a table (optional).java.lang.String
getBasicSelectClauseNullString(int sqlType)
Allows access to the basicDialect.getSelectClauseNullString(int)
implementation...CallableStatementSupport
getCallableStatementSupport()
java.lang.String
getCascadeConstraintsString()
Completely optional cascading drop clausejava.lang.String
getCreateSequenceString(java.lang.String sequenceName)
Typically dialects which support sequences can create a sequence with a single command.protected java.lang.String
getCreateSequenceString(java.lang.String sequenceName, int initialValue, int incrementSize)
Overloaded form ofDialect.getCreateSequenceString(String)
, additionally taking the initial value and increment size to be applied to the sequence definition.java.lang.String
getCrossJoinSeparator()
Returns the separator to use for defining cross joins when translating HQL queries.java.lang.String
getCurrentSchemaCommand()
Get the SQL command used to retrieve the current schema name.java.lang.String
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the database.java.lang.String
getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the current timestamp.MultiTableBulkIdStrategy
getDefaultMultiTableBulkIdStrategy()
java.lang.String
getDropSequenceString(java.lang.String sequenceName)
Typically dialects which support sequences can drop a sequence with a single command.java.lang.String
getForUpdateNowaitString()
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.java.lang.String
getForUpdateNowaitString(java.lang.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.java.lang.String
getForUpdateString(java.lang.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 anIN
predicate.LimitHandler
getLimitHandler()
Returns the delegate managing LIMIT clause.java.lang.String
getLimitString(java.lang.String sql, boolean hasOffset)
Apply s limit clause to the query.int
getMaxAliasLength()
What is the maximum length Hibernate can use for generated aliases?java.lang.String
getNotExpression(java.lang.String expression)
Negate an expressionjava.lang.String
getQueryHintString(java.lang.String sql, java.lang.String hints)
Apply a hint to the query.java.lang.String
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.java.sql.ResultSet
getResultSet(java.sql.CallableStatement ps)
Given a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
, extract theResultSet
from the OUT parameter.java.lang.String
getSelectClauseNullString(int sqlType)
Given aTypes
type code, determine an appropriate null value to use in a select clause.java.lang.String
getSelectGUIDString()
Get the command used to select a GUID from the underlying database.java.lang.String
getSelectSequenceNextValString(java.lang.String sequenceName)
Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement.java.lang.String
getSequenceNextValString(java.lang.String sequenceName)
Generate the appropriate select statement to to retrieve the next value of a sequence.protected SqlTypeDescriptor
getSqlTypeDescriptorOverride(int sqlCode)
Returns theSqlTypeDescriptor
that should be used to handle the given JDBC type code.ViolatedConstraintNameExtracter
getViolatedConstraintNameExtracter()
boolean
isCurrentTimestampSelectStringCallable()
Should the value returned byDialect.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(java.sql.CallableStatement statement, int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet
*by position*.protected void
registerReverseHibernateTypeMappings()
protected java.lang.String
statementType(java.lang.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?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 byboolean
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?-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, 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, getSequenceInformationExtractor, 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, supportsLimitOffset, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
registerCharacterTypeMappings
protected void registerCharacterTypeMappings()
-
registerNumericTypeMappings
protected void registerNumericTypeMappings()
-
registerDateTimeTypeMappings
protected void registerDateTimeTypeMappings()
-
registerLargeObjectTypeMappings
protected void registerLargeObjectTypeMappings()
-
registerReverseHibernateTypeMappings
protected void registerReverseHibernateTypeMappings()
-
registerFunctions
protected void registerFunctions()
-
registerDefaultProperties
protected void registerDefaultProperties()
-
getSqlTypeDescriptorOverride
protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode)
Description copied from class:Dialect
Returns theSqlTypeDescriptor
that should be used to handle the given JDBC type code. Returnsnull
if there is no override.- Overrides:
getSqlTypeDescriptorOverride
in classDialect
- Parameters:
sqlCode
- ATypes
constant indicating the SQL column type- Returns:
- The
SqlTypeDescriptor
to use as an override, ornull
if there is no override.
-
createOuterJoinFragment
public JoinFragment createOuterJoinFragment()
Description copied from class:Dialect
Create aJoinFragment
strategy responsible for handling this dialect's variations in how joins are handled.- Overrides:
createOuterJoinFragment
in classDialect
- Returns:
- This dialect's
JoinFragment
strategy.
-
getCrossJoinSeparator
public java.lang.String getCrossJoinSeparator()
Description copied from class:Dialect
Returns the separator to use for defining cross joins when translating HQL queries. Typically this will be either [ cross join ] or [, ] Note that the spaces are important!- Overrides:
getCrossJoinSeparator
in classDialect
- Returns:
- The cross join separator
-
createCaseFragment
public CaseFragment createCaseFragment()
Map case support to the Oracle DECODE function. Oracle did not add support for CASE until 9i. Create aCaseFragment
strategy responsible for handling this dialect's variations in how CASE statements are handled.- Overrides:
createCaseFragment
in classDialect
- Returns:
- This dialect's
CaseFragment
strategy.
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Returns the delegate managing LIMIT clause.- Overrides:
getLimitHandler
in classDialect
- Returns:
- LIMIT clause delegate.
-
getLimitString
public java.lang.String getLimitString(java.lang.String sql, boolean hasOffset)
Description copied from class:Dialect
Apply s limit clause to the query. Typically dialects utilizevariable
limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offest 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 andDialect.getLimitString(String, int, int)
.- Overrides:
getLimitString
in classDialect
- Parameters:
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?- Returns:
- the modified SQL
-
getBasicSelectClauseNullString
public java.lang.String getBasicSelectClauseNullString(int sqlType)
Allows access to the basicDialect.getSelectClauseNullString(int)
implementation...- Parameters:
sqlType
- TheTypes
mapping type code- Returns:
- The appropriate select cluse fragment
-
getSelectClauseNullString
public java.lang.String getSelectClauseNullString(int sqlType)
Description copied from class:Dialect
Given aTypes
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.- Overrides:
getSelectClauseNullString
in classDialect
- Parameters:
sqlType
- TheTypes
type code.- Returns:
- The appropriate select clause value fragment.
-
getCurrentTimestampSelectString
public java.lang.String getCurrentTimestampSelectString()
Description copied from class:Dialect
Retrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectString
in classDialect
- Returns:
- The command.
-
getCurrentTimestampSQLFunctionName
public java.lang.String getCurrentTimestampSQLFunctionName()
Description copied from class:Dialect
The name of the database-specific SQL function for retrieving the current timestamp.- Overrides:
getCurrentTimestampSQLFunctionName
in classDialect
- Returns:
- The function name.
-
getAddColumnString
public java.lang.String getAddColumnString()
Description copied from class:Dialect
The syntax used to add a column to a table (optional).- Overrides:
getAddColumnString
in classDialect
- Returns:
- The "add column" fragment.
-
getSequenceNextValString
public java.lang.String getSequenceNextValString(java.lang.String sequenceName)
Description copied from class:Dialect
Generate the appropriate select statement to to retrieve the next value of a sequence. This should be a "stand alone" select statement.- Overrides:
getSequenceNextValString
in classDialect
- Parameters:
sequenceName
- the name of the sequence- Returns:
- String The "nextval" select string.
-
getSelectSequenceNextValString
public java.lang.String getSelectSequenceNextValString(java.lang.String sequenceName)
Description copied from class:Dialect
Generate the select expression fragment that will retrieve the next value of a sequence as part of another (typically DML) statement. This differs fromDialect.getSequenceNextValString(String)
in that this should return an expression usable within another statement.- Overrides:
getSelectSequenceNextValString
in classDialect
- Parameters:
sequenceName
- the name of the sequence- Returns:
- The "nextval" fragment.
-
getCreateSequenceString
public java.lang.String getCreateSequenceString(java.lang.String sequenceName)
Description copied from class:Dialect
Typically dialects which support sequences can create a sequence with a single command. This is convenience form ofDialect.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 overrideDialect.getCreateSequenceStrings(java.lang.String)
.- Overrides:
getCreateSequenceString
in classDialect
- Parameters:
sequenceName
- The name of the sequence- Returns:
- The sequence creation command
-
getCreateSequenceString
protected java.lang.String getCreateSequenceString(java.lang.String sequenceName, int initialValue, int incrementSize)
Description copied from class:Dialect
Overloaded form ofDialect.getCreateSequenceString(String)
, additionally taking the initial value and increment size to be applied to the sequence definition. The default definition is to suffixDialect.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.- Overrides:
getCreateSequenceString
in classDialect
- Parameters:
sequenceName
- The name of the sequenceinitialValue
- The initial value to apply to 'create sequence' statementincrementSize
- The increment value to apply to 'create sequence' statement- Returns:
- The sequence creation command
-
getDropSequenceString
public java.lang.String getDropSequenceString(java.lang.String sequenceName)
Description copied from class:Dialect
Typically dialects which support sequences can drop a sequence with a single command. This is convenience form ofDialect.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 overrideDialect.getDropSequenceStrings(java.lang.String)
.- Overrides:
getDropSequenceString
in classDialect
- Parameters:
sequenceName
- The name of the sequence- Returns:
- The sequence drop commands
-
getCascadeConstraintsString
public java.lang.String getCascadeConstraintsString()
Description copied from class:Dialect
Completely optional cascading drop clause- Overrides:
getCascadeConstraintsString
in classDialect
- Returns:
- String
-
dropConstraints
public boolean dropConstraints()
Description copied from class:Dialect
Do we need to drop constraints before dropping tables in this dialect?- Overrides:
dropConstraints
in classDialect
- Returns:
- True if constraints must be dropped prior to dropping the table; false otherwise.
-
getForUpdateNowaitString
public java.lang.String getForUpdateNowaitString()
Description copied from class:Dialect
Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect.- Overrides:
getForUpdateNowaitString
in classDialect
- Returns:
- The appropriate FOR UPDATE NOWAIT clause string.
-
supportsSequences
public boolean supportsSequences()
Description copied from class:Dialect
Does this dialect support sequences?- Overrides:
supportsSequences
in classDialect
- Returns:
- True if sequences supported; false otherwise.
-
supportsPooledSequences
public boolean supportsPooledSequences()
Description copied from class:Dialect
Does this dialect support "pooled" sequences. Not aware of a better name for this. Essentially can we specify the initial and increment values?- Overrides:
supportsPooledSequences
in classDialect
- Returns:
- True if such "pooled" sequences are supported; false otherwise.
- See Also:
Dialect.getCreateSequenceStrings(String, int, int)
,Dialect.getCreateSequenceString(String, int, int)
-
supportsLimit
public boolean supportsLimit()
Description copied from class:Dialect
Does this dialect support some form of limiting query results via a SQL clause?- Overrides:
supportsLimit
in classDialect
- Returns:
- True if this dialect supports some form of LIMIT.
-
getForUpdateString
public java.lang.String getForUpdateString(java.lang.String aliases)
Description copied from class:Dialect
Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.- Overrides:
getForUpdateString
in classDialect
- Parameters:
aliases
- The columns to be write locked.- Returns:
- The appropriate FOR UPDATE OF column_list clause string.
-
getForUpdateNowaitString
public java.lang.String getForUpdateNowaitString(java.lang.String aliases)
Description copied from class:Dialect
Get the FOR UPDATE OF column_list NOWAIT fragment appropriate for this dialect given the aliases of the columns to be write locked.- Overrides:
getForUpdateNowaitString
in classDialect
- Parameters:
aliases
- The columns to be write locked.- Returns:
- The appropriate FOR UPDATE OF colunm_list NOWAIT clause string.
-
bindLimitParametersInReverseOrder
public boolean bindLimitParametersInReverseOrder()
Description copied from class:Dialect
ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. Does this dialect require us to bind the parameters in reverse order?- Overrides:
bindLimitParametersInReverseOrder
in classDialect
- Returns:
- true if the correct order is limit, offset
-
useMaxForLimit
public boolean useMaxForLimit()
Description copied from class:Dialect
Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows? This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9) So essentially, is limit relative from offset? Or is limit absolute?- Overrides:
useMaxForLimit
in classDialect
- Returns:
- True if limit is relative from offset; false otherwise.
-
forUpdateOfColumns
public boolean forUpdateOfColumns()
Description copied from class:Dialect
Is FOR UPDATE OF syntax supported?- Overrides:
forUpdateOfColumns
in classDialect
- Returns:
- True if the database supports FOR UPDATE OF syntax; false otherwise.
-
getQuerySequencesString
public java.lang.String getQuerySequencesString()
Description copied from class:Dialect
Get the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesString
in classDialect
- Returns:
- The select command; or null if sequences are not supported.
- See Also:
SchemaUpdate
-
getSelectGUIDString
public java.lang.String getSelectGUIDString()
Description copied from class:Dialect
Get the command used to select a GUID from the underlying database. Optional operation.- Overrides:
getSelectGUIDString
in classDialect
- Returns:
- The appropriate command.
-
getViolatedConstraintNameExtracter
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
- Specified by:
getViolatedConstraintNameExtracter
in interfaceConversionContext
- Overrides:
getViolatedConstraintNameExtracter
in classDialect
-
buildSQLExceptionConversionDelegate
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Description copied from class:Dialect
Build an instance of aSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState codes. WhenDialect.buildSQLExceptionConverter()
returns null, the defaultSQLExceptionConverter
is used to interpret SQLState and error codes. If this method is overridden to return a non-null value, the defaultSQLExceptionConverter
will use the returnedSQLExceptionConversionDelegate
in addition to the following standard delegates:- a "static" delegate based on the JDBC 4 defined SQLException hierarchy;
- a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType
- Overrides:
buildSQLExceptionConversionDelegate
in classDialect
- Returns:
- The SQLExceptionConversionDelegate for this dialect
-
registerResultSetOutParameter
public int registerResultSetOutParameter(java.sql.CallableStatement statement, int col) throws java.sql.SQLException
Description copied from class:Dialect
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returningResultSet
*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.- Overrides:
registerResultSetOutParameter
in classDialect
- Parameters:
statement
- The callable statement.col
- The bind position at which to register the output param.- Returns:
- The number of (contiguous) bind positions used.
- Throws:
java.sql.SQLException
- Indicates problems registering the param.
-
getResultSet
public java.sql.ResultSet getResultSet(java.sql.CallableStatement ps) throws java.sql.SQLException
Description copied from class:Dialect
Given a callable statement previously processed byDialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
, extract theResultSet
from the OUT parameter.- Overrides:
getResultSet
in classDialect
- Parameters:
ps
- The callable statement.- Returns:
- The extracted result set.
- Throws:
java.sql.SQLException
- Indicates problems extracting the result set.
-
supportsUnionAll
public boolean supportsUnionAll()
Description copied from class:Dialect
Does this dialect support UNION ALL, which is generally a faster variant of UNION?- Overrides:
supportsUnionAll
in classDialect
- Returns:
- True if UNION ALL is supported; false otherwise.
-
supportsCommentOn
public boolean supportsCommentOn()
Description copied from class:Dialect
Does this dialect/database support commenting on tables, columns, etc?- Overrides:
supportsCommentOn
in classDialect
- Returns:
true
if commenting is supported
-
getDefaultMultiTableBulkIdStrategy
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
- Overrides:
getDefaultMultiTableBulkIdStrategy
in classDialect
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
Description copied from class:Dialect
Does this dialect support a way to retrieve the database's current timestamp value?- Overrides:
supportsCurrentTimestampSelection
in classDialect
- Returns:
- True if the current timestamp can be retrieved; false otherwise.
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()
Description copied from class:Dialect
Should the value returned byDialect.getCurrentTimestampSelectString()
be treated as callable. Typically this indicates that JDBC escape syntax is being used...- Overrides:
isCurrentTimestampSelectStringCallable
in classDialect
- Returns:
- True if the
Dialect.getCurrentTimestampSelectString()
return is callable; false otherwise.
-
supportsEmptyInList
public boolean supportsEmptyInList()
Description copied from class:Dialect
Does this dialect support empty IN lists? For example, is [where XYZ in ()] a supported construct?- Overrides:
supportsEmptyInList
in classDialect
- Returns:
- True if empty in lists are supported; false otherwise.
-
supportsExistsInSelect
public boolean supportsExistsInSelect()
Description copied from class:Dialect
Does the dialect support an exists statement in the select clause?- Overrides:
supportsExistsInSelect
in classDialect
- Returns:
- True if exists checks are allowed in the select clause; false otherwise.
-
getInExpressionCountLimit
public int getInExpressionCountLimit()
Description copied from class:Dialect
Return the limit that the underlying database places on the number of elements in anIN
predicate. If the database defines no such limits, simply return zero or less-than-zero.- Overrides:
getInExpressionCountLimit
in classDialect
- Returns:
- int The limit, or zero-or-less to indicate no limit.
-
forceLobAsLastValue
public boolean forceLobAsLastValue()
Description copied from class:Dialect
HHH-4635 Oracle expects all Lob values to be last in inserts and updates.- Overrides:
forceLobAsLastValue
in classDialect
- Returns:
- boolean True if Lob values should be last, false if it does not matter.
-
useFollowOnLocking
public boolean useFollowOnLocking(QueryParameters parameters)
For Oracle, the FOR UPDATE clause cannot be applied when using ORDER BY, DISTINCT or views.- Overrides:
useFollowOnLocking
in classDialect
- Parameters:
parameters
-- Returns:
- See Also:
- Oracle FOR UPDATE restrictions
-
getNotExpression
public java.lang.String getNotExpression(java.lang.String expression)
Description copied from class:Dialect
Negate an expression- Overrides:
getNotExpression
in classDialect
- Parameters:
expression
- The expression to negate- Returns:
- The negated expression
-
getQueryHintString
public java.lang.String getQueryHintString(java.lang.String sql, java.lang.String hints)
Description copied from class:Dialect
Apply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.- Overrides:
getQueryHintString
in classDialect
- Parameters:
sql
- The query to which to apply the hint.hints
- The hints to apply- Returns:
- The modified SQL
-
getMaxAliasLength
public int getMaxAliasLength()
Description copied from class:Dialect
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. That "uniqueing" information will be added to the end of a identifier generated to the length specified here; so be sure to leave some room (generally speaking 5 positions will suffice).- Overrides:
getMaxAliasLength
in classDialect
- Returns:
- The maximum length.
-
getCallableStatementSupport
public CallableStatementSupport getCallableStatementSupport()
- Overrides:
getCallableStatementSupport
in classDialect
-
canCreateSchema
public boolean canCreateSchema()
Description copied from class:Dialect
Does this dialect support schema creation?- Overrides:
canCreateSchema
in classDialect
- Returns:
- True if the dialect supports schema creation; false otherwise.
-
getCurrentSchemaCommand
public java.lang.String getCurrentSchemaCommand()
Description copied from class:Dialect
Get the SQL command used to retrieve the current schema name. Works in conjunction withDialect.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 theConnection.getSchema()
method- Overrides:
getCurrentSchemaCommand
in classDialect
- Returns:
- The current schema retrieval SQL
-
supportsPartitionBy
public boolean supportsPartitionBy()
Description copied from class:Dialect
Does the underlying database support partition by- Overrides:
supportsPartitionBy
in classDialect
- Returns:
- boolean
-
statementType
protected java.lang.String statementType(java.lang.String sql)
-
supportsNoWait
public boolean supportsNoWait()
Description copied from class:Dialect
Does this dialect/database support NO_WAIT timeout.- Overrides:
supportsNoWait
in classDialect
- Returns:
true
if NO_WAIT is supported
-
-