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 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_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 StringappendLockHint(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.StringapplyLocksToSql(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.SQLExceptionConversionDelegatebuildSQLExceptionConversionDelegate()Build an instance of aSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.protected StringcolumnType(int sqlTypeCode)voidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)Allows the Dialect to contribute additional typesStringcurrentDate()Translation of the HQL/JPQLcurrent_datefunction, which maps to the Java typejava.sql.Date, and of the HQLlocal_datefunction which maps to the Java typejava.sql.LocalDate.StringcurrentTime()Translation of the HQL/JPQLcurrent_timefunction, which maps to the Java typejava.sql.Timewhich is a time with no time zone.StringcurrentTimestamp()Translation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typejava.sql.Timestampwhich is a datetime with no time zone.intgetDoublePrecision()This is the default precision for a generated column mapped to a JavaDoubleordouble.intgetFloatPrecision()This is the default precision for a generated column mapped to a JavaFloatorfloat.StringgetForUpdateString()Get the string to append to SELECT statements to acquire locks for this dialect.StringgetForUpdateString(String aliases)Get theFOR UPDATE OF column_listfragment appropriate for this dialect given the aliases of the columns to be write locked.longgetFractionalSecondPrecisionInNanos()The "native" precision for arithmetic with datetimes and day-to-second durations.LimitHandlergetLimitHandler()Returns aLimitHandlerthat implements support forQuery.setMaxResults(int)andQuery.setFirstResult(int)for this dialect.intgetMaxAliasLength()What is the maximum length Hibernate can use for generated aliases?intgetMaxIdentifierLength()What is the maximum identifier length supported by the dialect?intgetMaxVarcharLength()The biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.Dialect.SizeStrategygetSizeStrategy()SqlAstTranslatorFactorygetSqlAstTranslatorFactory()Return aSqlAstTranslatorFactoryspecific to this dialect.StringgetTableTypeString()ViolatedConstraintNameExtractorgetViolatedConstraintNameExtractor()RowLockStrategygetWriteRowLockStrategy()The row lock strategy to use for write locks.booleanisAnsiNullOn()protected voidregisterColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)Register ANSI-standard column types using the length limits defined byDialect.getMaxVarcharLength(),Dialect.getMaxNVarcharLength(), andDialect.getMaxVarbinaryLength().protected voidregisterDefaultKeywords()intresolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize)booleansupportsBitType()The Sybase ASEBITtype does not allow null values, so we don't use it.booleansupportsCascadeDelete()Does this dialect supporton deleteactions in foreign key definitions?booleansupportsDistinctFromPredicate()Does this dialect support some kind ofdistinct frompredicate?booleansupportsLobValueChangePropagation()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...booleansupportsLockTimeouts()Informational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.booleansupportsOrderByInSubquery()Does this dialect support theorder byclause in subqueries? For example:select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)booleansupportsPartitionBy()Does the underlying database support partition by?booleansupportsUnionInSubquery()Does this dialect support UNION in a subquery.booleansupportsValuesListForInsert()Does this dialect supportvalueslists of formVALUES (1), (2), (3)in insert statements?StringtimestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType)Obtain a pattern for the SQL equivalent to atimestampadd()function call.StringtimestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)Obtain a pattern for the SQL equivalent to atimestampdiff()function call.StringtoQuotedIdentifier(String name)Apply dialect-specific quoting.-
Methods inherited from class org.hibernate.dialect.SybaseDialect
appendDatetimeFormat, buildIdentifierHelper, canCreateSchema, castPattern, extractPattern, getAlterColumnTypeString, getCallableStatementSupport, getCurrentSchemaCommand, getInExpressionCountLimit, getMinimumSupportedVersion, getNameQualifierSupport, getNationalizationSupport, getNullColumnString, getSqmTranslatorFactory, getUniqueDelegate, initializeFunctionRegistry, resolveSqlTypeDescriptor, supportsAlterColumnType, supportsFractionalTimestampArithmetic, supportsNullPrecedence, supportsStandardCurrentTimestampFunction, 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, requiresCastForConcatenatingNonStrings, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsTupleDistinctCounts
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendArrayLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, canBatchTruncate, canCreateCatalog, canDisableConstraints, castType, checkVersion, closeQuote, createUpsertOperation, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, defaultScrollMode, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getCascadeConstraintsString, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, 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, supportsExpectedLobUsagePattern, supportsFetchClause, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsJdbcConnectionLobCreation, supportsLateral, supportsMaterializedLobAccess, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPredicateAsExpression, supportsRecursiveCTE, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsStandardArrays, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsValuesList, supportsWait, supportsWindowFunctions, toBooleanValueString, toString, transformSelectString, translateDurationField, 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:DialectThe database column type name for a given JDBC type code defined inTypesorSqlTypes. This default implementation returns the ANSI-standard type name.This method may be overridden by concrete
Dialects 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.NCLOBTypes.NCHAR, andTypes.NVARCHAR. On some database, these types are simply remapped toCLOB,CHAR, andVARCHAR. - Mappings for
Types.TIMESTAMPandTypes.TIMESTAMP_WITH_TIMEZONEshould 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-LONGcounterparts. - On the other hand, the types
SqlTypes.LONG32VARCHAR,SqlTypes.LONG32NVARCHAR, andSqlTypes.LONG32VARBINARYare not synonyms, and implementations of this method must define sensible mappings, for example to database-nativeTEXTorCLOBtypes.
- Overrides:
columnTypein 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:DialectRegister ANSI-standard column types using the length limits defined byDialect.getMaxVarcharLength(),Dialect.getMaxNVarcharLength(), andDialect.getMaxVarbinaryLength().This method is always called when a
Dialectis instantiated.- Overrides:
registerColumnTypesin classDialect
-
getMaxVarcharLength
public int getMaxVarcharLength()
Description copied from class:DialectThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type. For longer column lengths, use some sort oftext-like type for the column.- Overrides:
getMaxVarcharLengthin classDialect
-
isAnsiNullOn
public boolean isAnsiNullOn()
- Overrides:
isAnsiNullOnin classDialect
-
getFloatPrecision
public int getFloatPrecision()
Description copied from class:DialectThis is the default precision for a generated column mapped to a JavaFloatorfloat. 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:
getFloatPrecisionin classDialect- Returns:
- a value representing "single precision", usually in binary digits, but sometimes in decimal digits
-
getDoublePrecision
public int getDoublePrecision()
Description copied from class:DialectThis is the default precision for a generated column mapped to a JavaDoubleordouble. 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:
getDoublePrecisionin classDialect- Returns:
- a value representing "double precision", usually in binary digits, but sometimes in decimal digits
-
getSizeStrategy
public Dialect.SizeStrategy getSizeStrategy()
- Overrides:
getSizeStrategyin classDialect
-
getSqlAstTranslatorFactory
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Description copied from class:DialectReturn aSqlAstTranslatorFactoryspecific to this dialect. Returnnullto use Hibernate's standard translator.- Overrides:
getSqlAstTranslatorFactoryin classSybaseDialect- See Also:
StandardSqlAstTranslatorFactory,JdbcEnvironment.getSqlAstTranslatorFactory()
-
supportsBitType
public boolean supportsBitType()
The Sybase ASEBITtype does not allow null values, so we don't use it.- Overrides:
supportsBitTypein classDialect- Returns:
- false
-
supportsDistinctFromPredicate
public boolean supportsDistinctFromPredicate()
Description copied from class:DialectDoes this dialect support some kind ofdistinct frompredicate?This is, does it support syntax like
... where FIRST_NAME IS DISTINCT FROM LAST_NAME?- Overrides:
supportsDistinctFromPredicatein 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:DialectAllows the Dialect to contribute additional types- Overrides:
contributeTypesin 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:
resolveSqlTypeLengthin classDialect
-
currentDate
public String currentDate()
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_datefunction, which maps to the Java typejava.sql.Date, and of the HQLlocal_datefunction which maps to the Java typejava.sql.LocalDate.- Overrides:
currentDatein classDialect
-
currentTime
public String currentTime()
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timefunction, which maps to the Java typejava.sql.Timewhich is a time with no time zone. This contradicts ANSI SQL wherecurrent_timehas the typeTIME WITH TIME ZONE.It is recommended to override this in dialects for databases which support
localtimeortime at local.- Overrides:
currentTimein classDialect
-
currentTimestamp
public String currentTimestamp()
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typejava.sql.Timestampwhich is a datetime with no time zone. This contradicts ANSI SQL wherecurrent_timestamphas the typeTIMESTAMP WITH TIME ZONE.It is recommended to override this in dialects for databases which support
localtimestamportimestamp at local.- Overrides:
currentTimestampin classDialect
-
timestampaddPattern
public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType)
Description copied from class:DialectObtain a pattern for the SQL equivalent to atimestampadd()function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampaddPatternin 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:DialectThe "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:
getFractionalSecondPrecisionInNanosin classDialect- Returns:
- the precision, specified as a quantity of nanoseconds
- See Also:
TemporalUnit.NATIVE
-
timestampdiffPattern
public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType)
Description copied from class:DialectObtain a pattern for the SQL equivalent to atimestampdiff()function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampdiffPatternin 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:
registerDefaultKeywordsin classDialect
-
supportsCascadeDelete
public boolean supportsCascadeDelete()
Description copied from class:DialectDoes this dialect supporton deleteactions in foreign key definitions?- Overrides:
supportsCascadeDeletein classDialect- Returns:
trueif the dialect does support theon deleteclause.
-
getMaxAliasLength
public int getMaxAliasLength()
Description copied from class:DialectWhat 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:
getMaxAliasLengthin classDialect- Returns:
- The maximum length.
-
getMaxIdentifierLength
public int getMaxIdentifierLength()
Description copied from class:DialectWhat is the maximum identifier length supported by the dialect?- Overrides:
getMaxIdentifierLengthin classSybaseDialect- Returns:
- The maximum length.
-
supportsValuesListForInsert
public boolean supportsValuesListForInsert()
Description copied from class:DialectDoes this dialect supportvalueslists of formVALUES (1), (2), (3)in insert statements?- Overrides:
supportsValuesListForInsertin classDialect- Returns:
trueifvalueslist are supported in insert statements
-
supportsLockTimeouts
public boolean supportsLockTimeouts()
Description copied from class:DialectInformational metadata about whether this dialect is known to support specifying timeouts for requested lock acquisitions.- Overrides:
supportsLockTimeoutsin classDialect- Returns:
- True is this dialect supports specifying lock timeouts.
-
supportsOrderByInSubquery
public boolean supportsOrderByInSubquery()
Description copied from class:DialectDoes this dialect support theorder byclause in subqueries? For example:select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)- Overrides:
supportsOrderByInSubqueryin classDialect- Returns:
trueif it does
-
supportsUnionInSubquery
public boolean supportsUnionInSubquery()
Description copied from class:DialectDoes this dialect support UNION in a subquery.- Overrides:
supportsUnionInSubqueryin classDialect- Returns:
- True if UNION is supported ina subquery; false otherwise.
-
supportsPartitionBy
public boolean supportsPartitionBy()
Description copied from class:DialectDoes the underlying database support partition by?- Overrides:
supportsPartitionByin classAbstractTransactSQLDialect
-
getTableTypeString
public String getTableTypeString()
- Overrides:
getTableTypeStringin classDialect
-
supportsLobValueChangePropagation
public boolean supportsLobValueChangePropagation()
Description copied from class:DialectDoes 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 not
Dialect.supportsExpectedLobUsagePattern().- Overrides:
supportsLobValueChangePropagationin classDialect- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
getWriteRowLockStrategy
public RowLockStrategy getWriteRowLockStrategy()
Description copied from class:DialectThe row lock strategy to use for write locks.- Overrides:
getWriteRowLockStrategyin classAbstractTransactSQLDialect
-
getForUpdateString
public String getForUpdateString()
Description copied from class:DialectGet the string to append to SELECT statements to acquire locks for this dialect.- Overrides:
getForUpdateStringin classAbstractTransactSQLDialect- Returns:
- The appropriate
FOR UPDATEclause string.
-
getForUpdateString
public String getForUpdateString(String aliases)
Description copied from class:DialectGet theFOR UPDATE OF column_listfragment appropriate for this dialect given the aliases of the columns to be write locked.- Overrides:
getForUpdateStringin classDialect- Parameters:
aliases- The columns to be write locked.- Returns:
- The appropriate
FOR UPDATE OF column_listclause string.
-
appendLockHint
public String appendLockHint(LockOptions mode, String tableName)
Description copied from class:DialectSome 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:
appendLockHintin 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:DialectModifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.The behavior here is that of an ANSI SQL
SELECT FOR UPDATE. This method is really intended to allow dialects which do not supportSELECT FOR UPDATEto achieve this in their own fashion.- Overrides:
applyLocksToSqlin 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:DialectApply dialect-specific quoting.- Overrides:
toQuotedIdentifierin classDialect- Parameters:
name- The value to be quoted.- Returns:
- The quoted value.
- See Also:
Dialect.openQuote(),Dialect.closeQuote()
-
getViolatedConstraintNameExtractor
public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor()
- Specified by:
getViolatedConstraintNameExtractorin interfaceConversionContext- Overrides:
getViolatedConstraintNameExtractorin classDialect
-
buildSQLExceptionConversionDelegate
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Description copied from class:DialectBuild an instance of aSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.If this method is overridden to return a non-null value, the default
SQLExceptionConverterwill use the returnedSQLExceptionConversionDelegatein 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
It is strongly recommended that specific Dialect implementations override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific ErrorCode rather than the SQLState.
Specific Dialects may override to return whatever is most appropriate for that vendor.
- Overrides:
buildSQLExceptionConversionDelegatein classDialect- Returns:
- The SQLExceptionConversionDelegate for this dialect
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:DialectReturns aLimitHandlerthat implements support forQuery.setMaxResults(int)andQuery.setFirstResult(int)for this dialect.- Overrides:
getLimitHandlerin classDialect
-
-