Class SybaseASEDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.AbstractTransactSQLDialect
-
- org.hibernate.dialect.SybaseDialect
-
- org.hibernate.dialect.SybaseASEDialect
-
- All Implemented Interfaces:
FunctionContributor
,TypeContributor
,ConversionContext
public class SybaseASEDialect extends SybaseDialect
A SQL dialect for Sybase Adaptive Server Enterprise 16 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_MULTI_KEY_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 thefrom
clause.SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()
An instance ofSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState codes.protected String
columnType(int sqlTypeCode)
void
contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
A callback which allows theDialect
to contribute types.String
currentDate()
String
currentTime()
Translation of the HQL/JPQLcurrent_time
function, which maps to the Java typeTime
which is a time with no time zone.String
currentTimestamp()
Translation of the HQL/JPQLcurrent_timestamp
function, which maps to the Java typeTimestamp
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
.long
getFractionalSecondPrecisionInNanos()
Sybase ASE in principle supports microsecond precision for {code bigdatetime}, but unfortunately its duration arithmetic functions have a nasty habit of overflowing.LimitHandler
getLimitHandler()
Obtain aLimitHandler
that implements pagination support forQuery.setMaxResults(int)
andQuery.setFirstResult(int)
.int
getMaxAliasLength()
What is the maximum length Hibernate can use for generated aliases?int
getMaxIdentifierLength()
What is the maximum identifier length supported by this dialect?int
getMaxVarcharLength()
The biggest size value that can be supplied as argument to aTypes.VARCHAR
-like type.Dialect.SizeStrategy
getSizeStrategy()
A customDialect.SizeStrategy
for column types.SqlAstTranslatorFactory
getSqlAstTranslatorFactory()
String
getTableTypeString()
An arbitrary fragment appended to the end of thecreate table
statement.ViolatedConstraintNameExtractor
getViolatedConstraintNameExtractor()
AViolatedConstraintNameExtractor
for extracting the name of a violated constraint from aSQLException
.boolean
isAnsiNullOn()
A setting specific toSybaseASEDialect
.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()
Register the reserved words of ANSI-standard SQL as keywords.int
resolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize)
Determine the length/precision of a column based on information in the JDBCResultSetMetaData
.boolean
supportsBitType()
The Sybase ASEBIT
type does not allow null values, so we don't use it.boolean
supportsCascadeDelete()
Does this dialect supporton delete
actions in foreign key definitions?boolean
supportsDistinctFromPredicate()
Does this dialect support some kind ofdistinct from
predicate?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()
Does this dialect support specifying timeouts when requesting locks.boolean
supportsOrderByInSubquery()
Does this dialect support theorder by
clause in subqueries?boolean
supportsPartitionBy()
Does is dialect supportpartition by
?boolean
supportsSkipLocked()
Does this dialect supportSKIP_LOCKED
timeout.boolean
supportsUnionInSubquery()
Does this dialect supportUNION
in a subquery.boolean
supportsValuesListForInsert()
Does this dialect supportvalues
lists of formVALUES (1), (2), (3)
in insert statements?String
timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType)
Obtain a pattern for the SQL equivalent to atimestampadd()
function call.String
timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, 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, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, buildIdentifierHelper, canCreateSchema, castPattern, extractPattern, getAlterColumnTypeString, getCallableStatementSupport, getCurrentSchemaCommand, getDriverKind, getIdentityColumnSupport, getInExpressionCountLimit, getMinimumSupportedVersion, getNameQualifierSupport, getNationalizationSupport, getNullColumnString, getParameterCountLimit, getSqmTranslatorFactory, getUniqueDelegate, initializeFunctionRegistry, resolveSqlTypeDescriptor, supportsAlterColumnType, supportsFractionalTimestampArithmetic, supportsNamedParameters, supportsNullPrecedence, supportsStandardCurrentTimestampFunction, translateExtractField, trimPattern
-
Methods inherited from class org.hibernate.dialect.AbstractTransactSQLDialect
appendBinaryLiteral, applyLocksToSql, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getAddColumnString, getCurrentTimestampSelectString, getDefaultStatementBatchSize, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getForUpdateString, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getResultSet, getSelectGUIDString, getSupportedTemporaryTableKind, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getWriteRowLockStrategy, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, replaceLtrimRtrim, requiresCastForConcatenatingNonStrings, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsTupleDistinctCounts
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendArrayLiteral, appendBooleanValueString, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, canBatchTruncate, canCreateCatalog, canDisableConstraints, castType, checkVersion, closeQuote, contribute, contributeFunctions, createOptionalTableUpdateOperation, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, defaultScrollMode, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCascadeConstraintsString, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMultiKeyLoadSizingStrategy, getNativeIdentifierGenerationType, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNoColumnsInsertString, getNullColumnString, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getWriteLockString, getWriteLockString, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, inlineLiteral, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, isLockTimeoutParameterized, openQuote, ordinal, prependComment, quote, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, rowId, rowIdSqlType, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExpectedLobUsagePattern, supportsFetchClause, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsJdbcConnectionLobCreation, supportsLateral, supportsMaterializedLobAccess, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPredicateAsExpression, supportsRecursiveCTE, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsStandardArrays, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsValuesList, supportsWait, supportsWindowFunctions, toBooleanValueString, toString, transformSelectString, translateDurationField, useArrayForMultiValuedParameters, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
-
-
-
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 database 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.Note that:
- Implementations of this method are expected to define a
sensible mapping for
Types.NCLOB
Types.NCHAR
, andTypes.NVARCHAR
. On some database, these types are simply remapped toCLOB
,CHAR
, andVARCHAR
. - Mappings for
Types.TIMESTAMP
andTypes.TIMESTAMP_WITH_TIMEZONE
should support explicit specification of precision if possible. - As specified by
DdlTypeRegistry.getDescriptor(int)
, this method never receivesTypes.LONGVARCHAR
,Types.LONGNVARCHAR
, norTypes.LONGVARBINARY
, which are considered synonyms for their non-LONG
counterparts. - On the other hand, the types
SqlTypes.LONG32VARCHAR
,SqlTypes.LONG32NVARCHAR
, andSqlTypes.LONG32VARBINARY
are not synonyms, and implementations of this method must define sensible mappings, for example to database-nativeTEXT
orCLOB
types.
- Overrides:
columnType
in classAbstractTransactSQLDialect
- Parameters:
sqlTypeCode
- a SQLtype code
- Returns:
- a column type name, with
$l
,$p
,$s
placeholders for length, precision, scale - See Also:
SqlTypes
- Implementations of this method are expected to define a
sensible mapping for
-
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 biggest size value that can be supplied as argument to aTypes.VARCHAR
-like type.For longer column lengths, use some sort of
text
-like type for the column.- Overrides:
getMaxVarcharLength
in classDialect
-
isAnsiNullOn
public boolean isAnsiNullOn()
Description copied from class:Dialect
A setting specific toSybaseASEDialect
.- 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()
Description copied from class:Dialect
A customDialect.SizeStrategy
for column types.- Overrides:
getSizeStrategy
in classDialect
-
getSqlAstTranslatorFactory
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Description copied from class:Dialect
- 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
Does this dialect support some kind ofdistinct from
predicate?That is, 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
A callback which allows theDialect
to contribute 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)
Description copied from class:Dialect
Determine the length/precision of a column based on information in the JDBCResultSetMetaData
. Note that what JDBC reports as a "precision" might actually be the column length.- Overrides:
resolveSqlTypeLength
in classDialect
- Parameters:
columnTypeName
- the name of the column typejdbcTypeCode
- the JDBC type code of the column typeprecision
- the (numeric) precision or (character) length of the columnscale
- the scale of a numeric columndisplaySize
- the display size of the column- Returns:
- the precision or length of the column
-
currentDate
public String currentDate()
Description copied from class:Dialect
Translation of the HQL/JPQLcurrent_date
function, which maps to the Java typeDate
, and of the HQLlocal_date
function which maps to the Java typeLocalDate
.- 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 typeTime
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 typeTimestamp
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
-
getFractionalSecondPrecisionInNanos
public long getFractionalSecondPrecisionInNanos()
Sybase ASE in principle supports microsecond precision for {code bigdatetime}, but unfortunately its duration arithmetic functions have a nasty habit of overflowing. So to give ourselves a little extra headroom, we will usemillisecond
as the native unit of precision.- Overrides:
getFractionalSecondPrecisionInNanos
in classDialect
- Returns:
- the precision, specified as a quantity of nanoseconds
- See Also:
TemporalUnit.NATIVE
-
timestampaddPattern
public String timestampaddPattern(TemporalUnit unit, 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
-
timestampdiffPattern
public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, 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()
Description copied from class:Dialect
Register the reserved words of ANSI-standard SQL as keywords.- Overrides:
registerDefaultKeywords
in classDialect
- See Also:
AnsiSqlKeywords
-
supportsCascadeDelete
public boolean supportsCascadeDelete()
Description copied from class:Dialect
Does this dialect supporton delete
actions in foreign key definitions?- Overrides:
supportsCascadeDelete
in classDialect
- Returns:
true
if the dialect does support theon delete
clause.
-
getMaxAliasLength
public int getMaxAliasLength()
Description copied from class:Dialect
What is the maximum length Hibernate can use for generated aliases?- 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 this dialect?- Overrides:
getMaxIdentifierLength
in classSybaseDialect
- Returns:
- The maximum length.
-
supportsValuesListForInsert
public boolean supportsValuesListForInsert()
Description copied from class:Dialect
Does this dialect supportvalues
lists of formVALUES (1), (2), (3)
in insert statements?- Overrides:
supportsValuesListForInsert
in classDialect
- Returns:
true
ifvalues
list are allowed in insert statements
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
Description copied from class:Dialect
Does this dialect support specifying timeouts when requesting locks.- 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 theorder by
clause in subqueries?For example:
select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)
- Overrides:
supportsOrderByInSubquery
in classDialect
- Returns:
true
if it does
-
supportsUnionInSubquery
public boolean supportsUnionInSubquery()
Description copied from class:Dialect
Does this dialect supportUNION
in a subquery.- Overrides:
supportsUnionInSubquery
in classDialect
- Returns:
- True if
UNION
is supported in a subquery; false otherwise.
-
supportsPartitionBy
public boolean supportsPartitionBy()
Description copied from class:Dialect
Does is dialect supportpartition by
?- Overrides:
supportsPartitionBy
in classAbstractTransactSQLDialect
-
getTableTypeString
public String getTableTypeString()
Description copied from class:Dialect
An arbitrary fragment appended to the end of thecreate table
statement.- Overrides:
getTableTypeString
in classDialect
-
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)
.
- Overrides:
supportsLobValueChangePropagation
in classDialect
- Returns:
- True if the changes are propagated back to the database; false otherwise.
- For BLOBs, the internal value might be changed by:
-
supportsSkipLocked
public boolean supportsSkipLocked()
Description copied from class:Dialect
Does this dialect supportSKIP_LOCKED
timeout.- Overrides:
supportsSkipLocked
in classDialect
- Returns:
true
if SKIP_LOCKED is supported
-
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 thefrom
clause.- 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.
-
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()
Description copied from class:Dialect
AViolatedConstraintNameExtractor
for extracting the name of a violated constraint from aSQLException
.- Specified by:
getViolatedConstraintNameExtractor
in interfaceConversionContext
- Overrides:
getViolatedConstraintNameExtractor
in classDialect
-
buildSQLExceptionConversionDelegate
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Description copied from class:Dialect
An instance ofSQLExceptionConversionDelegate
for interpreting dialect-specific error or SQLState codes.If this method is overridden to return a non-null value, the default
SQLExceptionConverter
will use the returnedSQLExceptionConversionDelegate
in addition to the following standard delegates:- a "static" delegate based on the JDBC4-defined
SQLException
hierarchy, and - a delegate that interprets SQLState codes as either X/Open or SQL-2003 codes, depending on what is reported by the JDBC driver.
It is strongly recommended that every
Dialect
implementation override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific error code, rather than on the SQLState.- Overrides:
buildSQLExceptionConversionDelegate
in classDialect
- Returns:
- The
SQLExceptionConversionDelegate
for this dialect
- a "static" delegate based on the JDBC4-defined
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Obtain aLimitHandler
that implements pagination support forQuery.setMaxResults(int)
andQuery.setFirstResult(int)
.- Overrides:
getLimitHandler
in classDialect
-
-