Class SybaseASEDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.AbstractTransactSQLDialect
-
- org.hibernate.dialect.SybaseDialect
-
- org.hibernate.dialect.SybaseASEDialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
Sybase11Dialect
,SybaseASE157Dialect
,SybaseASE15Dialect
public class SybaseASEDialect extends SybaseDialect
A SQL dialect for Sybase Adaptive Server Enterprise 11.9 and above.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.SybaseDialect
jtdsDriver
-
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description SybaseASEDialect()
SybaseASEDialect(DatabaseVersion version)
SybaseASEDialect(DialectResolutionInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
appendLockHint(LockOptions mode, String tableName)
Some dialects support an alternative means toSELECT FOR UPDATE
, whereby a "lock hint" is appended to the table name in the from clause.String
applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String,String[]> keyColumnNames)
Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()
Build an instance of aSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState codes.protected String
columnType(int sqlTypeCode)
void
contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional typesString
currentDate()
Translation of the HQL/JPQLcurrent_date
function, which maps to the Java typejava.sql.Date
, and of the HQLlocal_date
function which maps to the Java typejava.sql.LocalDate
.String
currentTime()
Translation of the HQL/JPQLcurrent_time
function, which maps to the Java typejava.sql.Time
which is a time with no time zone.String
currentTimestamp()
Translation of the HQL/JPQLcurrent_timestamp
function, which maps to the Java typejava.sql.Timestamp
which is a datetime with no time zone.int
getDoublePrecision()
This is the default precision for a generated column mapped to a JavaDouble
ordouble
.int
getFloatPrecision()
This is the default precision for a generated column mapped to a JavaFloat
orfloat
.String
getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect.String
getForUpdateString(String aliases)
Get theFOR UPDATE OF column_list
fragment appropriate for this dialect given the aliases of the columns to be write locked.long
getFractionalSecondPrecisionInNanos()
The "native" precision for arithmetic with datetimes and day-to-second durations.LimitHandler
getLimitHandler()
Returns aLimitHandler
that implements support forQuery.setMaxResults(int)
andQuery.setFirstResult(int)
for this dialect.int
getMaxAliasLength()
What is the maximum length Hibernate can use for generated aliases?int
getMaxIdentifierLength()
What is the maximum identifier length supported by the dialect?int
getMaxVarcharLength()
The longest possible length of aTypes.VARCHAR
-like column.Dialect.SizeStrategy
getSizeStrategy()
SqlAstTranslatorFactory
getSqlAstTranslatorFactory()
Return an SqlAstTranslatorFactory specific for the Dialect.String
getTableTypeString()
ViolatedConstraintNameExtractor
getViolatedConstraintNameExtractor()
RowLockStrategy
getWriteRowLockStrategy()
The row lock strategy to use for write locks.boolean
isAnsiNullOn()
protected void
registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Register ANSI-standard column types using the length limits defined byDialect.getMaxVarcharLength()
,Dialect.getMaxNVarcharLength()
, andDialect.getMaxVarbinaryLength()
.protected void
registerDefaultKeywords()
int
resolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize)
boolean
supportsBitType()
The Sybase ASEBIT
type does not allow null values, so we don't use it.boolean
supportsCascadeDelete()
Does this dialect support cascaded delete on foreign key definitions?boolean
supportsDistinctFromPredicate()
Is this SQL dialect known to support some kind of distinct from predicate.boolean
supportsExpectedLobUsagePattern()
Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes...boolean
supportsLobValueChangePropagation()
Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance...boolean
supportsLockTimeouts()
Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.boolean
supportsOrderByInSubquery()
Does this dialect support the order by clause in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)boolean
supportsPartitionBy()
Does the underlying database support partition by?boolean
supportsUnionInSubquery()
Does this dialect support UNION in a subquery.boolean
supportsValuesListForInsert()
Does this dialect/database support VALUES list (e.g.String
timestampaddPattern(TemporalUnit unit, jakarta.persistence.TemporalType temporalType, IntervalType intervalType)
Obtain a pattern for the SQL equivalent to atimestampadd()
function call.String
timestampdiffPattern(TemporalUnit unit, jakarta.persistence.TemporalType fromTemporalType, jakarta.persistence.TemporalType toTemporalType)
Obtain a pattern for the SQL equivalent to atimestampdiff()
function call.String
toQuotedIdentifier(String name)
Apply dialect-specific quoting.-
Methods inherited from class org.hibernate.dialect.SybaseDialect
appendDatetimeFormat, buildIdentifierHelper, canCreateSchema, castPattern, extractPattern, getCurrentSchemaCommand, getInExpressionCountLimit, getNameQualifierSupport, getNationalizationSupport, getNullColumnString, getSqmTranslatorFactory, initializeFunctionRegistry, resolveSqlTypeDescriptor, supportsFractionalTimestampArithmetic, supportsNullPrecedence, translateExtractField, trimPattern
-
Methods inherited from class org.hibernate.dialect.AbstractTransactSQLDialect
appendBinaryLiteral, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getAddColumnString, getCurrentTimestampSelectString, getDefaultStatementBatchSize, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getIdentityColumnSupport, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getResultSet, getSelectGUIDString, getSupportedTemporaryTableKind, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, replaceLtrimRtrim, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsTupleDistinctCounts
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendArrayLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, canCreateCatalog, castType, checkVersion, closeQuote, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, defaultScrollMode, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getEnumCheckCondition, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharLength, getMaxVarbinaryLength, getMinimumSupportedVersion, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getTableComment, getTableExporter, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeZoneSupport, getUniqueDelegate, getUniqueKeyExporter, getVersion, getWriteLockString, getWriteLockString, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, openQuote, prependComment, quote, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsFetchClause, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsJdbcConnectionLobCreation, supportsLateral, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsStandardArrays, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsValuesList, supportsWait, supportsWindowFunctions, toBooleanValueString, toString, transformSelectString, translateDurationField, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Constructor Detail
-
SybaseASEDialect
public SybaseASEDialect()
-
SybaseASEDialect
public SybaseASEDialect(DatabaseVersion version)
-
SybaseASEDialect
public SybaseASEDialect(DialectResolutionInfo info)
-
-
Method Detail
-
columnType
protected String columnType(int sqlTypeCode)
Description copied from class:Dialect
The column type name for a given JDBC type code defined inTypes
orSqlTypes
. This default implementation returns the ANSI-standard type name.This method may be overridden by concrete
Dialect
s as an alternative toDialect.registerColumnTypes(TypeContributions, ServiceRegistry)
for simple registrations.- Overrides:
columnType
in classAbstractTransactSQLDialect
- Parameters:
sqlTypeCode
- a SQL type code- Returns:
- a column type name, with $l, $p, $s placeholders for length, precision, scale
- See Also:
SqlTypes
-
registerColumnTypes
protected void registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Description copied from class:Dialect
Register ANSI-standard column types using the length limits defined byDialect.getMaxVarcharLength()
,Dialect.getMaxNVarcharLength()
, andDialect.getMaxVarbinaryLength()
.This method is always called when a
Dialect
is instantiated.- Overrides:
registerColumnTypes
in classDialect
-
getMaxVarcharLength
public int getMaxVarcharLength()
Description copied from class:Dialect
The longest possible length of aTypes.VARCHAR
-like column. For longer column lengths, use some sort oftext
-like type for the column.- Overrides:
getMaxVarcharLength
in classDialect
-
isAnsiNullOn
public boolean isAnsiNullOn()
- Overrides:
isAnsiNullOn
in classDialect
-
getFloatPrecision
public int getFloatPrecision()
Description copied from class:Dialect
This is the default precision for a generated column mapped to a JavaFloat
orfloat
. That is, a value representing "single precision".Usually 24 binary digits, at least for databases with a conventional interpretation of the ANSI SQL specification.
- Overrides:
getFloatPrecision
in classDialect
- Returns:
- a value representing "single precision", usually in binary digits, but sometimes in decimal digits
-
getDoublePrecision
public int getDoublePrecision()
Description copied from class:Dialect
This is the default precision for a generated column mapped to a JavaDouble
ordouble
. That is, a value representing "double precision".Usually 53 binary digits, at least for databases with a conventional interpretation of the ANSI SQL specification.
- Overrides:
getDoublePrecision
in classDialect
- Returns:
- a value representing "double precision", usually in binary digits, but sometimes in decimal digits
-
getSizeStrategy
public Dialect.SizeStrategy getSizeStrategy()
- Overrides:
getSizeStrategy
in classDialect
-
getSqlAstTranslatorFactory
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Description copied from class:Dialect
Return an SqlAstTranslatorFactory specific for the Dialect. Returnnull
to use Hibernate's standard translator.- Overrides:
getSqlAstTranslatorFactory
in classSybaseDialect
- See Also:
StandardSqlAstTranslatorFactory
,JdbcEnvironment.getSqlAstTranslatorFactory()
-
supportsBitType
public boolean supportsBitType()
The Sybase ASEBIT
type does not allow null values, so we don't use it.- Overrides:
supportsBitType
in classDialect
- Returns:
- false
-
supportsDistinctFromPredicate
public boolean supportsDistinctFromPredicate()
Description copied from class:Dialect
Is this SQL dialect known to support some kind of distinct from predicate. Basically, does it support syntax like "... where FIRST_NAME IS DISTINCT FROM LAST_NAME"- Overrides:
supportsDistinctFromPredicate
in classDialect
- Returns:
- True if this SQL dialect is known to support some kind of distinct from predicate; false otherwise
-
contributeTypes
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Description copied from class:Dialect
Allows the Dialect to contribute additional types- Overrides:
contributeTypes
in classSybaseDialect
- Parameters:
typeContributions
- Callback to contribute the typesserviceRegistry
- The service registry
-
resolveSqlTypeLength
public int resolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize)
- Overrides:
resolveSqlTypeLength
in classDialect
-
currentDate
public String currentDate()
Description copied from class:Dialect
Translation of the HQL/JPQLcurrent_date
function, which maps to the Java typejava.sql.Date
, and of the HQLlocal_date
function which maps to the Java typejava.sql.LocalDate
.- Overrides:
currentDate
in classDialect
-
currentTime
public String currentTime()
Description copied from class:Dialect
Translation of the HQL/JPQLcurrent_time
function, which maps to the Java typejava.sql.Time
which is a time with no time zone. This contradicts ANSI SQL wherecurrent_time
has the typeTIME WITH TIME ZONE
.It is recommended to override this in dialects for databases which support
localtime
ortime at local
.- Overrides:
currentTime
in classDialect
-
currentTimestamp
public String currentTimestamp()
Description copied from class:Dialect
Translation of the HQL/JPQLcurrent_timestamp
function, which maps to the Java typejava.sql.Timestamp
which is a datetime with no time zone. This contradicts ANSI SQL wherecurrent_timestamp
has the typeTIMESTAMP WITH TIME ZONE
.It is recommended to override this in dialects for databases which support
localtimestamp
ortimestamp at local
.- Overrides:
currentTimestamp
in classDialect
-
timestampaddPattern
public String timestampaddPattern(TemporalUnit unit, jakarta.persistence.TemporalType temporalType, IntervalType intervalType)
Description copied from class:Dialect
Obtain a pattern for the SQL equivalent to atimestampadd()
function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampaddPattern
in classSybaseDialect
- Parameters:
unit
- The unit to add to the temporaltemporalType
- The type of the temporalintervalType
- The type of interval to add or null if it's not a native interval
-
getFractionalSecondPrecisionInNanos
public long getFractionalSecondPrecisionInNanos()
Description copied from class:Dialect
The "native" precision for arithmetic with datetimes and day-to-second durations. Datetime differences will be calculated with this precision except when a precision is explicitly specified as aTemporalUnit
.Usually 1 (nanoseconds), 1_000 (microseconds), or 1_000_000 (milliseconds).
- Overrides:
getFractionalSecondPrecisionInNanos
in classDialect
- Returns:
- the precision, specified as a quantity of nanoseconds
- See Also:
TemporalUnit.NATIVE
-
timestampdiffPattern
public String timestampdiffPattern(TemporalUnit unit, jakarta.persistence.TemporalType fromTemporalType, jakarta.persistence.TemporalType toTemporalType)
Description copied from class:Dialect
Obtain a pattern for the SQL equivalent to atimestampdiff()
function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampdiffPattern
in classSybaseDialect
- Parameters:
unit
- the first argumentfromTemporalType
- true if the first argument is a timestamp, false if a datetoTemporalType
- true if the second argument is
-
registerDefaultKeywords
protected void registerDefaultKeywords()
- Overrides:
registerDefaultKeywords
in classDialect
-
supportsCascadeDelete
public boolean supportsCascadeDelete()
Description copied from class:Dialect
Does this dialect support cascaded delete on foreign key definitions?- Overrides:
supportsCascadeDelete
in classDialect
- Returns:
true
indicates that the dialect does support cascaded delete on foreign keys.
-
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.
-
getMaxIdentifierLength
public int getMaxIdentifierLength()
Description copied from class:Dialect
What is the maximum identifier length supported by the dialect?- Overrides:
getMaxIdentifierLength
in classSybaseDialect
- Returns:
- The maximum length.
-
supportsValuesListForInsert
public boolean supportsValuesListForInsert()
Description copied from class:Dialect
Does this dialect/database support VALUES list (e.g. VALUES (1), (2), (3) ) for insert statements.- Overrides:
supportsValuesListForInsert
in classDialect
- Returns:
true
if VALUES list are supported for insert statements
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
Description copied from class:Dialect
Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.- Overrides:
supportsLockTimeouts
in classDialect
- Returns:
- True is this dialect supports specifying lock timeouts.
-
supportsOrderByInSubquery
public boolean supportsOrderByInSubquery()
Description copied from class:Dialect
Does this dialect support the order by clause in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)- Overrides:
supportsOrderByInSubquery
in classDialect
- Returns:
- boolean
-
supportsUnionInSubquery
public boolean supportsUnionInSubquery()
Description copied from class:Dialect
Does this dialect support UNION in a subquery.- Overrides:
supportsUnionInSubquery
in classDialect
- Returns:
- True if UNION is supported ina subquery; false otherwise.
-
supportsPartitionBy
public boolean supportsPartitionBy()
Description copied from class:Dialect
Does the underlying database support partition by?- Overrides:
supportsPartitionBy
in classAbstractTransactSQLDialect
-
getTableTypeString
public String getTableTypeString()
- Overrides:
getTableTypeString
in classDialect
-
supportsExpectedLobUsagePattern
public boolean supportsExpectedLobUsagePattern()
Description copied from class:Dialect
Expected LOB usage pattern is such that I can perform an insert via prepared statement with a parameter binding for a LOB value without crazy casting to JDBC driver implementation-specific classes... Part of the trickiness here is the fact that this is largely driver dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x versions of their drivers...- Overrides:
supportsExpectedLobUsagePattern
in classDialect
- Returns:
- True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
-
supportsLobValueChangePropagation
public boolean supportsLobValueChangePropagation()
Description copied from class:Dialect
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... For BLOBs, the internal value might be changed by:Blob.setBinaryStream(long)
,Blob.setBytes(long, byte[])
,Blob.setBytes(long, byte[], int, int)
, orBlob.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)
, orClob.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 notDialect.supportsExpectedLobUsagePattern()
.- Overrides:
supportsLobValueChangePropagation
in classDialect
- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
getWriteRowLockStrategy
public RowLockStrategy getWriteRowLockStrategy()
Description copied from class:Dialect
The row lock strategy to use for write locks.- Overrides:
getWriteRowLockStrategy
in classAbstractTransactSQLDialect
-
getForUpdateString
public String getForUpdateString()
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire locks for this dialect.- Overrides:
getForUpdateString
in classAbstractTransactSQLDialect
- Returns:
- The appropriate
FOR UPDATE
clause string.
-
getForUpdateString
public String getForUpdateString(String aliases)
Description copied from class:Dialect
Get theFOR 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.
-
appendLockHint
public String appendLockHint(LockOptions mode, String tableName)
Description copied from class:Dialect
Some dialects support an alternative means toSELECT FOR UPDATE
, whereby a "lock hint" is appended to the table name in the from clause. contributed by Helge Schulz- Overrides:
appendLockHint
in classAbstractTransactSQLDialect
- Parameters:
mode
- The lock options to applytableName
- The name of the table to which to apply the lock hint.- Returns:
- The table with any required lock hints.
-
applyLocksToSql
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String,String[]> keyColumnNames)
Description copied from class:Dialect
Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns. The behavior here is that of an ANSI SQLSELECT FOR UPDATE
. This method is really intended to allow dialects which do not supportSELECT FOR UPDATE
to achieve this in their own fashion.- Overrides:
applyLocksToSql
in classAbstractTransactSQLDialect
- Parameters:
sql
- the SQL string to modifyaliasedLockOptions
- lock options indexed by aliased table names.keyColumnNames
- a map of key columns indexed by aliased table names.- Returns:
- the modified SQL string.
-
toQuotedIdentifier
public String toQuotedIdentifier(String name)
Description copied from class:Dialect
Apply dialect-specific quoting.- Overrides:
toQuotedIdentifier
in classDialect
- Parameters:
name
- The value to be quoted.- Returns:
- The quoted value.
- See Also:
Dialect.openQuote()
,Dialect.closeQuote()
-
getViolatedConstraintNameExtractor
public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
- Specified by:
getViolatedConstraintNameExtractor
in interfaceConversionContext
- Overrides:
getViolatedConstraintNameExtractor
in classDialect
-
buildSQLExceptionConversionDelegate
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Description copied from class:Dialect
Build an instance of aSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState 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
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Returns aLimitHandler
that implements support forQuery.setMaxResults(int)
andQuery.setFirstResult(int)
for this dialect.- Overrides:
getLimitHandler
in classDialect
-
-