Class SybaseASEDialect
- All Implemented Interfaces:
FunctionContributor,TypeContributor,ConversionContext
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl -
Field Summary
FieldsFields inherited from class org.hibernate.dialect.SybaseDialect
jtdsDriverFields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, FALSE_STRING_VALUES, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TRUE_STRING_VALUES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendLockHint(LockOptions mode, String tableName) Some dialects support an alternative means toSELECT FOR UPDATE, whereby a "lock hint" is appended to the table name in thefromclause.An instance ofSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.protected StringcolumnType(int sqlTypeCode) voidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) A callback which allows theDialectto contribute types.Translation of the HQL/JPQLcurrent_timefunction, which maps to the Java typeTimewhich is a time with no time zone.Translation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typeTimestampwhich is a datetime with no time zone.How does this dialect support aggregate types likeSqlTypes.STRUCT.longintThis is the default precision for a generated column mapped to a JavaDoubleordouble.getDual()Returns a table expression that has one row.intThis is the default precision for a generated column mapped to a JavaFloatorfloat.longSybase ASE in principle supports microsecond precision for {code bigdatetime}, but unfortunately its duration arithmetic functions have a nasty habit of overflowing.Obtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).Access to various details and operations related to this Dialect's support for pessimistic locking.intWhat is the maximum length Hibernate can use for generated aliases?intWhat is the maximum identifier length supported by this dialect?protected intSybase ASE doesn't support thegenerate_seriesfunction orlateralrecursive CTEs, so it has to be emulated with thexmltableandreplicatefunctions.intThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.intThe JDBC type code to use for mapping properties of basic Java array orCollectiontypes.A customDialect.SizeStrategyfor column types.An arbitrary fragment appended to the end of thecreate tablestatement.AViolatedConstraintNameExtractorfor extracting the name of a violated constraint from aSQLException.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Initialize the given registry with any dialect-specific functions.booleanprotected voidregisterColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Register ANSI-standard column types using the length limits defined byDialect.getMaxVarcharLength(),Dialect.getMaxNVarcharLength(), andDialect.getMaxVarbinaryLength().protected voidRegister the reserved words of ANSI-standard SQL as keywords.booleanThe Sybase ASEBITtype does not allow null values, so we don't use it.booleanDoes this dialect supporton deleteactions in foreign key definitions?booleanIs thecross joinsyntax supported?booleanDoes this dialect support some kind ofdistinct frompredicate?booleanbooleanbooleanDoes 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.booleanDoes this dialect support theorder byclause in subqueries?booleanDoes is dialect supportpartition byin window functions?booleanDoes this dialect supportUNIONin a subquery.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Obtain a pattern for the SQL equivalent to atimestampadd()function call.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Obtain a pattern for the SQL equivalent to atimestampdiff()function call.toQuotedIdentifier(String name) Apply dialect-specific quoting.Methods inherited from class org.hibernate.dialect.SybaseDialect
addPartitionKeyToPrimaryKey, appendDatetimeFormat, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, buildIdentifierHelper, canCreateSchema, castPattern, extractPattern, getAlterColumnTypeString, getCallableStatementSupport, getCurrentSchemaCommand, getDmlTargetColumnQualifierSupport, getDriverKind, getIdentityColumnSupport, getInExpressionCountLimit, getMinimumSupportedVersion, getNameQualifierSupport, getNationalizationSupport, getNullColumnString, getParameterCountLimit, getSchemaNameResolver, getSqmTranslatorFactory, getUniqueDelegate, resolveSqlTypeDescriptor, resolveSqlTypeLength, stripsTrailingSpacesFromChar, supportsAlterColumnType, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsNamedParameters, supportsNullPrecedence, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsStandardCurrentTimestampFunction, supportsWithClause, translateExtractFieldMethods inherited from class org.hibernate.dialect.AbstractTransactSQLDialect
appendBinaryLiteral, applyLocksToSql, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getAddColumnString, getCurrentTimestampSelectString, getDefaultStatementBatchSize, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getForUpdateString, getLocalTemporaryTableStrategy, getLockingClauseStrategy, getNullOrdering, getPreferredSqlTypeCodeForBoolean, getResultSet, getSelectGUIDString, getSupportedTemporaryTableKind, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, isCurrentTimestampSelectStringCallable, qualifyIndexName, registerResultSetOutParameter, replaceLtrimRtrim, requiresCastForConcatenatingNonStrings, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsTupleDistinctCounts, trimPatternMethods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, addUseIndexQueryHint, appendArrayLiteral, appendBooleanValueString, appendCheckConstraintOptions, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canDisableConstraints, castType, checkVersion, closeQuote, contribute, contributeFunctions, createOptionalTableUpdateOperation, currentLocalTime, currentLocalTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getBeforeDropStatement, getCascadeConstraintsString, getCaseInsensitiveLike, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getDefaultDecimalPrecision, getDefaultIntervalSecondScale, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFromDualForSelectOnly, getFunctionalDependencyAnalysisSupport, getGlobalTemporaryTableStrategy, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMultiKeyLoadSizingStrategy, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSelectClauseNullString, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getWriteLockString, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, openQuote, ordinal, prependComment, quote, quoteCollation, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, rowId, rowIdSqlType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsDuplicateSelectItemsInQueryGroup, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsLateral, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntaxInInSubQuery, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardArrays, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClauseInSubquery, toBooleanValueString, toString, transformSelectString, translateDurationField, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
Field Details
-
MAX_PAGE_SIZE
public static final int MAX_PAGE_SIZE- See Also:
-
-
Constructor Details
-
SybaseASEDialect
public SybaseASEDialect() -
SybaseASEDialect
-
SybaseASEDialect
-
-
Method Details
-
columnType
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,$splaceholders for length, precision, scale - See Also:
- 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
-
getPreferredSqlTypeCodeForArray
public int getPreferredSqlTypeCodeForArray()Description copied from class:DialectThe JDBC type code to use for mapping properties of basic Java array orCollectiontypes.Usually
SqlTypes.ARRAYorSqlTypes.VARBINARY.- Overrides:
getPreferredSqlTypeCodeForArrayin classDialect- Returns:
- one of the type codes defined by
SqlTypes.
-
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 of
text-like type for the column.- Overrides:
getMaxVarcharLengthin classDialect
-
initializeFunctionRegistry
Description copied from class:DialectInitialize the given registry with any dialect-specific functions.Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it.
These required functions include the functions defined by the JPA query language specification:
-
avg(arg)- aggregate function -
count([distinct ]arg)- aggregate function -
max(arg)- aggregate function -
min(arg)- aggregate function -
sum(arg)- aggregate function
-
coalesce(arg0, arg1, ...) -
nullif(arg0, arg1)
-
lower(arg) -
upper(arg) -
length(arg) -
concat(arg0, arg1, ...) -
locate(pattern, string[, start]) -
substring(string, start[, length]) -
trim([[spec ][character ]from] string)
-
abs(arg) -
mod(arg0, arg1) -
sqrt(arg)
-
current date -
current time -
current timestamp
-
any(arg)- aggregate function -
every(arg)- aggregate function
-
var_samp(arg)- aggregate function -
var_pop(arg)- aggregate function -
stddev_samp(arg)- aggregate function -
stddev_pop(arg)- aggregate function
-
cast(arg as Type) -
extract(field from arg)
-
ln(arg) -
exp(arg) -
power(arg0, arg1) -
floor(arg) -
ceiling(arg)
-
position(pattern in string) -
substring(string from start[ for length]) -
overlay(string placing replacement from start[ for length])
java.timetypes:-
local date -
local time -
local datetime -
offset datetime -
instant
-
left(string, length) -
right(string, length) -
replace(string, pattern, replacement) -
pad(string with length spec[ character]) -
repeat(string, times)
-
pi -
log10(arg) -
log(base, arg) -
sign(arg) -
sin(arg) -
cos(arg) -
tan(arg) -
asin(arg) -
acos(arg) -
atan(arg) -
atan2(arg0, arg1) -
round(arg0[, arg1]) -
truncate(arg0[, arg1]) -
sinh(arg) -
tanh(arg) -
cosh(arg) -
least(arg0, arg1, ...) -
greatest(arg0, arg1, ...) -
degrees(arg) -
radians(arg) -
bitand(arg1, arg1) -
bitor(arg1, arg1) -
bitxor(arg1, arg1)
-
format(datetime as pattern) -
collate(string as collation) -
str(arg)- synonym ofcast(a as String) -
ifnull(arg0, arg1)- synonym ofcoalesce(a, b)
-
ordinal(arg) -
string(arg)
extract(), and desugared by the parser:-
second(arg)- synonym ofextract(second from a) -
minute(arg)- synonym ofextract(minute from a) -
hour(arg)- synonym ofextract(hour from a) -
day(arg)- synonym ofextract(day from a) -
month(arg)- synonym ofextract(month from a) -
year(arg)- synonym ofextract(year from a)
second()function returns a floating point value, contrary to the integer type returned by the native function with this name on many databases. Thus, we don't just naively map these HQL functions to the native SQL functions with the same names.- Overrides:
initializeFunctionRegistryin classSybaseDialect
-
-
getMaximumSeriesSize
protected int getMaximumSeriesSize()Sybase ASE doesn't support thegenerate_seriesfunction orlateralrecursive CTEs, so it has to be emulated with thexmltableandreplicatefunctions. -
getDefaultLobLength
public long getDefaultLobLength()Description copied from class:DialectThis is the default length for a generated column of typeBLOBorCLOBmapped toBloborClob, if LOB columns have a length in this dialect.- Overrides:
getDefaultLobLengthin classDialect- Returns:
- 1048576L by default
- See Also:
-
isAnsiNullOn
public boolean isAnsiNullOn() -
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
Description copied from class:DialectA customDialect.SizeStrategyfor column types.- Overrides:
getSizeStrategyin classDialect
-
getSqlAstTranslatorFactory
Description copied from class:Dialect- Overrides:
getSqlAstTranslatorFactoryin classSybaseDialect- See Also:
-
getAggregateSupport
Description copied from class:DialectHow does this dialect support aggregate types likeSqlTypes.STRUCT.- Overrides:
getAggregateSupportin classDialect
-
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?That 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 frompredicate; false otherwise
-
contributeTypes
Description copied from class:DialectA callback which allows theDialectto contribute types.- Overrides:
contributeTypesin classSybaseDialect- Parameters:
typeContributions- Callback to contribute the typesserviceRegistry- The service registry
-
currentDate
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_datefunction, which maps to the Java typeDate, and of the HQLlocal_datefunction which maps to the Java typeLocalDate.- Overrides:
currentDatein classDialect
-
currentTime
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timefunction, which maps to the Java typeTimewhich 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
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typeTimestampwhich 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
-
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 usemillisecondas the native unit of precision.- Overrides:
getFractionalSecondPrecisionInNanosin classDialect- Returns:
- the precision, specified as a quantity of nanoseconds
- See Also:
-
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
-
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()Description copied from class:DialectRegister the reserved words of ANSI-standard SQL as keywords.- Overrides:
registerDefaultKeywordsin classDialect- See Also:
-
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?- Overrides:
getMaxAliasLengthin classDialect- Returns:
- The maximum length.
-
getMaxIdentifierLength
public int getMaxIdentifierLength()Description copied from class:DialectWhat is the maximum identifier length supported by this dialect?- Overrides:
getMaxIdentifierLengthin classSybaseDialect- Returns:
- The maximum length.
-
getLockingSupport
Description copied from class:DialectAccess to various details and operations related to this Dialect's support for pessimistic locking.- Overrides:
getLockingSupportin classSybaseDialect
-
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 supportUNIONin a subquery.- Overrides:
supportsUnionInSubqueryin classDialect- Returns:
- True if
UNIONis supported in a subquery; false otherwise.
-
supportsPartitionBy
public boolean supportsPartitionBy()Description copied from class:DialectDoes is dialect supportpartition byin window functions?- Overrides:
supportsPartitionByin classAbstractTransactSQLDialect
-
getTableTypeString
Description copied from class:DialectAn arbitrary fragment appended to the end of thecreate tablestatement.- 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).
- Overrides:
supportsLobValueChangePropagationin classDialect- Returns:
- True if the changes are propagated back to the database; false otherwise.
- For BLOBs, the internal value might be changed by:
-
appendLockHint
Description copied from class:DialectSome dialects support an alternative means toSELECT FOR UPDATE, whereby a "lock hint" is appended to the table name in thefromclause.- 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.
-
toQuotedIdentifier
Description copied from class:DialectApply dialect-specific quoting.- Overrides:
toQuotedIdentifierin classDialect- Parameters:
name- The value to be quoted.- Returns:
- The quoted value.
- See Also:
-
getViolatedConstraintNameExtractor
Description copied from class:DialectAViolatedConstraintNameExtractorfor extracting the name of a violated constraint from aSQLException.- Specified by:
getViolatedConstraintNameExtractorin interfaceConversionContext- Overrides:
getViolatedConstraintNameExtractorin classDialect
-
buildSQLExceptionConversionDelegate
Description copied from class:DialectAn instance ofSQLExceptionConversionDelegatefor 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 JDBC4-defined
SQLExceptionhierarchy, 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
Dialectimplementation 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:
buildSQLExceptionConversionDelegatein classDialect- Returns:
- The
SQLExceptionConversionDelegatefor this dialect
- a "static" delegate based on the JDBC4-defined
-
getLimitHandler
Description copied from class:DialectObtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).- Overrides:
getLimitHandlerin classDialect
-
getDual
Description copied from class:DialectReturns a table expression that has one row. -
supportsIntersect
public boolean supportsIntersect()- Overrides:
supportsIntersectin classDialect
-
supportsJoinsInDelete
public boolean supportsJoinsInDelete()- Overrides:
supportsJoinsInDeletein classDialect
-
supportsCrossJoin
public boolean supportsCrossJoin()Description copied from class:DialectIs thecross joinsyntax supported?- Overrides:
supportsCrossJoinin classDialect
-