Class SybaseDialect
- All Implemented Interfaces:
FunctionContributor,TypeContributor,ConversionContext
- Direct Known Subclasses:
SybaseASEDialect
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanDeprecated, for removal: This API element is subject to removal in a future version.Fields 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 TypeMethodDescriptionbooleanDoes this dialect require that the columns listed inpartition byalso occur in the primary key, when defining table partitioning?voidappendDatetimeFormat(SqlAppender appender, String format) Translate the given datetime format string from the pattern language defined by Java'sDateTimeFormatterto whatever pattern language is understood by the native datetime formatting function for this database (often theto_char()function).voidappendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal representing the givenjava.timevalue to the givenSqlAppender.voidappendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal representing the givenCalendarvalue to the givenSqlAppender.voidappendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal representing the givenDatevalue to the givenSqlAppender.buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData metadata) TheIdentifierHelperindicated by this dialect for handling identifier conversions.booleanDoes this dialect support creating and dropping schema?castPattern(CastType from, CastType to) Obtain a pattern for the SQL equivalent to acast()function call.voidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) A callback which allows theDialectto contribute types.extractPattern(TemporalUnit unit) Obtain a pattern for the SQL equivalent to anextract()function call.getAlterColumnTypeString(String columnName, String columnType, String columnDefinition) The fragment of analter tablecommand which modifies a column type, or null if column types cannot be modified.TheCallableStatementSupportfor this database.Get the SQL command used to retrieve the current schema name.Get the minimumDmlTargetColumnQualifierSupportrequired by this dialect.Get the appropriateIdentityColumnSupportfor this dialect.intReturn the limit that the underlying database places on the number of elements in anINpredicate.Access to various details and operations related to this Dialect's support for pessimistic locking.intWhat is the maximum identifier length supported by this dialect?protected DatabaseVersionGet the version of the SQL dialect that is the minimum supported by this implementation.Determines whether this database requires the use of explicitly nationalized character (Unicode) data types.The keyword used to specify a nullable column, usually"", but sometimes" null".intReturn the limit that the underlying database places on the number of parameters that can be defined for a PreparedStatement.Get the strategy for determining the schema name from a JDBCConnection, usuallyDefaultSchemaNameResolver.Get theUniqueDelegatesupported by this dialectvoidinitializeFunctionRegistry(FunctionContributions functionContributions) Initialize the given registry with any dialect-specific functions.resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, JdbcTypeRegistry jdbcTypeRegistry) Assigns an appropriateJdbcTypeto a column of a JDBC result set based on the column type name, JDBC type code, precision, and scale.intresolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize) Determine the length/precision of a column based on information in the JDBCResultSetMetaData.booleanDoes this dialect strip trailing spaces from values stored in columns of typechar(n)? MySQL and Sybase are the main offenders here.booleanDoes this dialect support modifying the type of an existing column?booleanWhether the database supports adding a fractional interval to a timestamp, for exampletimestamp + 0.5 second.booleanDoes this dialect support thefromclause for update statements?booleansupportsNamedParameters(DatabaseMetaData databaseMetaData) booleanDoes this dialect supportnulls firstandnulls last?booleanIs this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.booleanIf the dialect supportsrow values, does it offer such support in IN lists as well?booleanIs this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.booleanDoes this dialect have an ANSI SQLcurrent_timestampfunction?booleanWhether the SQL with clause is supported.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.Return the name used to identify the given field as an argument to theextract()function, or of this dialect's equivalent function.Methods inherited from class org.hibernate.dialect.AbstractTransactSQLDialect
appendBinaryLiteral, appendLockHint, applyLocksToSql, columnType, 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, supportsPartitionBy, 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, buildSQLExceptionConversionDelegate, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canBatchTruncate, canCreateCatalog, canDisableConstraints, castType, checkVersion, closeQuote, contribute, contributeFunctions, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, determineDatabaseVersion, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, 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, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getDual, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getFromDualForSelectOnly, getFunctionalDependencyAnalysisSupport, getGlobalTemporaryTableStrategy, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getKeywords, getLimitHandler, getLobMergeStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMaxVarcharLength, getMultiKeyLoadSizingStrategy, getNativeIdentifierGeneratorStrategy, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getNullColumnString, getPersistentTemporaryTableStrategy, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSelectClauseNullString, getSelectClauseNullString, getSequenceExporter, getSequenceInformationExtractor, getSequenceSupport, getSizeStrategy, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getViolatedConstraintNameExtractor, getWriteLockString, getWriteLockString, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, initDefaultProperties, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, openQuote, ordinal, prependComment, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, rowId, rowIdSqlType, supportsArrayConstructor, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBindingNullSqlTypeForSetNull, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCrossJoin, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFilterClause, supportsForUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedColumnCheck, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsOffsetInSubquery, supportsOrderByInSubquery, 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, supportsUnionInSubquery, supportsUpdateReturning, supportsUserDefinedTypes, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, supportsWithClauseInSubquery, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useConnectionToCreateLob, useCrossReferenceForeignKeys, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
Field Details
-
jtdsDriver
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
SybaseDialect
public SybaseDialect() -
SybaseDialect
-
SybaseDialect
-
-
Method Details
-
getMinimumSupportedVersion
Description copied from class:DialectGet the version of the SQL dialect that is the minimum supported by this implementation.- Overrides:
getMinimumSupportedVersionin classDialect
-
getDriverKind
-
resolveSqlTypeDescriptor
public JdbcType resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale, JdbcTypeRegistry jdbcTypeRegistry) Description copied from class:DialectAssigns an appropriateJdbcTypeto a column of a JDBC result set based on the column type name, JDBC type code, precision, and scale.- Overrides:
resolveSqlTypeDescriptorin classAbstractTransactSQLDialect- Parameters:
columnTypeName- the column type namejdbcTypeCode- thetype codeprecision- the precision or 0scale- the scale or 0- Returns:
- an appropriate instance of
JdbcType
-
resolveSqlTypeLength
public int resolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize) Description copied from class:DialectDetermine 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:
resolveSqlTypeLengthin 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
-
getSqmTranslatorFactory
Description copied from class:DialectReturn aSqmTranslatorFactoryspecific to this dialect, ornullto use the standard translator.Note that
QueryEngineOptions.getCustomSqmTranslatorFactory()has higher precedence since it comes directly from the user config.- Overrides:
getSqmTranslatorFactoryin classDialect- See Also:
-
getSqlAstTranslatorFactory
Description copied from class:Dialect- Overrides:
getSqlAstTranslatorFactoryin classDialect- See Also:
-
getLockingSupport
Description copied from class:DialectAccess to various details and operations related to this Dialect's support for pessimistic locking.- Overrides:
getLockingSupportin classDialect
-
supportsNullPrecedence
public boolean supportsNullPrecedence()Description copied from class:DialectDoes this dialect supportnulls firstandnulls last?- Overrides:
supportsNullPrecedencein classDialect
-
getInExpressionCountLimit
public int getInExpressionCountLimit()Description copied from class:DialectReturn the limit that the underlying database places on the number of elements in anINpredicate. If the database defines no such limits, simply return zero or a number smaller than zero.- Overrides:
getInExpressionCountLimitin classDialect- Returns:
- The limit, or a non-positive integer to indicate no limit.
-
getParameterCountLimit
public int getParameterCountLimit()Description copied from class:DialectReturn the limit that the underlying database places on the number of parameters that can be defined for a PreparedStatement. If the database defines no such limits, simply return zero or a number smaller than zero. By default, Dialect returns the same value asDialect.getInExpressionCountLimit().- Overrides:
getParameterCountLimitin classDialect- Returns:
- The limit, or a non-positive integer to indicate no limit.
-
contributeTypes
Description copied from class:DialectA callback which allows theDialectto contribute types.- Overrides:
contributeTypesin classDialect- Parameters:
typeContributions- Callback to contribute the typesserviceRegistry- The service registry
-
getNationalizationSupport
Description copied from class:DialectDetermines whether this database requires the use of explicitly nationalized character (Unicode) data types.That is, whether the use of
Types.NCHAR,Types.NVARCHAR, andTypes.NCLOBis required for nationalized character data.- Overrides:
getNationalizationSupportin classDialect
-
stripsTrailingSpacesFromChar
public boolean stripsTrailingSpacesFromChar()Description copied from class:DialectDoes this dialect strip trailing spaces from values stored in columns of typechar(n)? MySQL and Sybase are the main offenders here.- Overrides:
stripsTrailingSpacesFromCharin 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 classAbstractTransactSQLDialect
-
-
getNullColumnString
Description copied from class:DialectThe keyword used to specify a nullable column, usually"", but sometimes" null".- Overrides:
getNullColumnStringin classDialect
-
canCreateSchema
public boolean canCreateSchema()Description copied from class:DialectDoes this dialect support creating and dropping schema?- Overrides:
canCreateSchemain classDialect- Returns:
- True if the dialect supports schema creation; false otherwise.
-
getSchemaNameResolver
Description copied from class:DialectGet the strategy for determining the schema name from a JDBCConnection, usuallyDefaultSchemaNameResolver.- Overrides:
getSchemaNameResolverin classDialect- Returns:
- The schema name resolver strategy
-
getCurrentSchemaCommand
Description copied from class:DialectGet the SQL command used to retrieve the current schema name.Works in conjunction with
Dialect.getSchemaNameResolver(), unless the resultingSchemaNameResolverdoes not need this information. For example, a custom implementation might make use of the Java 1.7Connection.getSchema()method.- Overrides:
getCurrentSchemaCommandin classDialect- Returns:
- The current schema retrieval SQL
-
getMaxIdentifierLength
public int getMaxIdentifierLength()Description copied from class:DialectWhat is the maximum identifier length supported by this dialect?- Overrides:
getMaxIdentifierLengthin classDialect- Returns:
- The maximum length.
-
castPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to acast()function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.- Overrides:
castPatternin classDialect- Parameters:
from- aCastTypeindicating the type of the value argumentto- aCastTypeindicating the type the value argument is cast to
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenjava.timevalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classDialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenDatevalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classDialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenCalendarvalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classDialect
-
translateExtractField
Description copied from class:DialectReturn the name used to identify the given field as an argument to theextract()function, or of this dialect's equivalent function.This method does not need to handle
TemporalUnit.NANOSECOND,TemporalUnit.NATIVE,TemporalUnit.OFFSET,TemporalUnit.DATE,TemporalUnit.TIME,TemporalUnit.WEEK_OF_YEAR, norTemporalUnit.WEEK_OF_MONTH, which are already desugared byExtractFunction.- Overrides:
translateExtractFieldin classDialect
-
extractPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to anextract()function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.This method does not need to handle
TemporalUnit.NANOSECOND,TemporalUnit.NATIVE,TemporalUnit.OFFSET,TemporalUnit.DATE,TemporalUnit.TIME,TemporalUnit.WEEK_OF_YEAR, orTemporalUnit.WEEK_OF_MONTH, which are already desugared byExtractFunction.- Overrides:
extractPatternin classDialect- Parameters:
unit- the first argument
-
supportsFractionalTimestampArithmetic
public boolean supportsFractionalTimestampArithmetic()Description copied from class:DialectWhether the database supports adding a fractional interval to a timestamp, for exampletimestamp + 0.5 second.- Overrides:
supportsFractionalTimestampArithmeticin 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 classDialect- 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 classDialect- Parameters:
unit- the first argumentfromTemporalType- true if the first argument is a timestamp, false if a datetoTemporalType- true if the second argument is
-
appendDatetimeFormat
Description copied from class:DialectTranslate the given datetime format string from the pattern language defined by Java'sDateTimeFormatterto whatever pattern language is understood by the native datetime formatting function for this database (often theto_char()function).Since it's never possible to translate every pattern letter sequences understood by
DateTimeFormatter, only the following subset of pattern letters is accepted by Hibernate:- G: era
- y: year of era
- Y: year of week-based year
- M: month of year
- w: week of week-based year (ISO week number)
- W: week of month
- E: day of week (name)
- e: day of week (number)
- d: day of month
- D: day of year
- a: AM/PM
- H: hour of day (24 hour time)
- h: hour of AM/PM (12 hour time)
- m: minutes
- s: seconds
- z,Z,x: timezone offset
In addition, punctuation characters and single-quoted literal strings are accepted.
Appends a pattern accepted by the function that formats dates and times in this dialect to a SQL fragment that is being constructed.
- Overrides:
appendDatetimeFormatin classDialect
-
supportsStandardCurrentTimestampFunction
public boolean supportsStandardCurrentTimestampFunction()Description copied from class:DialectDoes this dialect have an ANSI SQLcurrent_timestampfunction?- Overrides:
supportsStandardCurrentTimestampFunctionin classDialect
-
buildIdentifierHelper
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, DatabaseMetaData metadata) throws SQLException Description copied from class:DialectTheIdentifierHelperindicated by this dialect for handling identifier conversions. Returningnullis allowed and indicates that Hibernate should fall back to building a "standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilder during this call will still be incorporated into the built IdentifierHelper.The incoming builder will have the following set:
IdentifierHelperBuilder.isGloballyQuoteIdentifiers()IdentifierHelperBuilder.getUnquotedCaseStrategy()- initialized to UPPERIdentifierHelperBuilder.getQuotedCaseStrategy()- initialized to MIXED
By default, Hibernate will do the following:
- Call
IdentifierHelperBuilder.applyIdentifierCasing(DatabaseMetaData) - Call
IdentifierHelperBuilder.applyReservedWords(DatabaseMetaData) - Applies
AnsiSqlKeywords.sql2003()as reserved words - Applies the
Dialect.sqlKeywordscollected here as reserved words - Applies the Dialect's
NameQualifierSupport, if it defines one
- Overrides:
buildIdentifierHelperin classDialect- Parameters:
builder- A partially-configuredIdentifierHelperBuilder.metadata- Access to the metadata returned from the driver if needed and if available. WARNING: it may benull.- Returns:
- The
IdentifierHelperinstance to use, ornullto indicate Hibernate should use its fallback path - Throws:
SQLException- Accessing theDatabaseMetaDatacan throw it. Just rethrow and Hibernate will handle it.- See Also:
-
getNameQualifierSupport
Description copied from class:DialectThe support for qualified identifiers.By default, decide based on
DatabaseMetaData.- Overrides:
getNameQualifierSupportin classDialect- Returns:
- The
NameQualifierSupport, or null to useDatabaseMetaData.
-
getUniqueDelegate
Description copied from class:DialectGet theUniqueDelegatesupported by this dialect- Overrides:
getUniqueDelegatein classDialect- Returns:
- The UniqueDelegate
-
getCallableStatementSupport
Description copied from class:DialectTheCallableStatementSupportfor this database. Does this database support returning cursors?- Overrides:
getCallableStatementSupportin classDialect
-
supportsNamedParameters
Description copied from class:Dialect- Overrides:
supportsNamedParametersin classDialect- Throws:
SQLException- Accessing theDatabaseMetaDatacause an exception. Just rethrow and Hibernate will handle it.
-
getAlterColumnTypeString
public String getAlterColumnTypeString(String columnName, String columnType, String columnDefinition) Description copied from class:DialectThe fragment of analter tablecommand which modifies a column type, or null if column types cannot be modified. Oftenalter column col_name set data type col_type.- Overrides:
getAlterColumnTypeStringin classDialect- Parameters:
columnName- the name of the columncolumnType- the new type of the columncolumnDefinition- the full column definition- Returns:
- a fragment to be appended to
alter table
-
supportsAlterColumnType
public boolean supportsAlterColumnType()Description copied from class:DialectDoes this dialect support modifying the type of an existing column?- Overrides:
supportsAlterColumnTypein classDialect
-
getIdentityColumnSupport
Description copied from class:DialectGet the appropriateIdentityColumnSupportfor this dialect.- Overrides:
getIdentityColumnSupportin classAbstractTransactSQLDialect- Returns:
- the IdentityColumnSupport
-
getDmlTargetColumnQualifierSupport
Description copied from class:DialectGet the minimumDmlTargetColumnQualifierSupportrequired by this dialect.- Overrides:
getDmlTargetColumnQualifierSupportin classDialect- Returns:
- the column qualifier support required by this dialect
-
supportsFromClauseInUpdate
public boolean supportsFromClauseInUpdate()Description copied from class:DialectDoes this dialect support thefromclause for update statements?- Overrides:
supportsFromClauseInUpdatein classDialect- Returns:
trueiffromclause is supported
-
supportsRowValueConstructorSyntax
public boolean supportsRowValueConstructorSyntax()Description copied from class:DialectIs this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...- Overrides:
supportsRowValueConstructorSyntaxin classDialect- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax; false otherwise.
-
supportsWithClause
public boolean supportsWithClause()Description copied from class:DialectWhether the SQL with clause is supported.- Overrides:
supportsWithClausein classDialect
-
supportsRowValueConstructorSyntaxInQuantifiedPredicates
public boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()Description copied from class:DialectIs this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ALL (select ...) ...- Overrides:
supportsRowValueConstructorSyntaxInQuantifiedPredicatesin classDialect- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax with quantified predicates; false otherwise.
-
supportsRowValueConstructorSyntaxInInList
public boolean supportsRowValueConstructorSyntaxInInList()Description copied from class:DialectIf the dialect supportsrow values, does it offer such support in IN lists as well?For example,
... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ...- Overrides:
supportsRowValueConstructorSyntaxInInListin classDialect- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.
-
addPartitionKeyToPrimaryKey
public boolean addPartitionKeyToPrimaryKey()Description copied from class:DialectDoes this dialect require that the columns listed inpartition byalso occur in the primary key, when defining table partitioning?- Overrides:
addPartitionKeyToPrimaryKeyin classDialect
-