Package org.hibernate.dialect
Class H2Dialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.H2Dialect
-
- All Implemented Interfaces:
ConversionContext
public class H2Dialect extends Dialect
A dialect compatible with the H2 database.
-
-
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.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, sequenceExporter, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description H2Dialect()H2Dialect(int version)H2Dialect(int version, int buildId)H2Dialect(DialectResolutionInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendBooleanValueString(SqlAppender appender, boolean bool)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).SQLExceptionConversionDelegatebuildSQLExceptionConversionDelegate()Build an instance of aSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.voidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)Allows the Dialect to contribute additional typesStringcurrentTime()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.StringcurrentTimestampWithTimeZone()Translation of the HQLoffset_datetimefunction, which maps to the Java typejava.time.OffsetDateTimewhich is a datetime with a time zone.booleandoesReadCommittedCauseWritersToBlockReaders()For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?booleandropConstraints()Do we need to drop constraints before dropping tables in this dialect?StringextractPattern(TemporalUnit unit)In H2, the extract() function does not return fractional seconds for the the fieldTemporalUnit.SECOND.StringgetCascadeConstraintsString()The keyword that specifies that adrop tableoperation should be cascaded to its constraints, typically" cascade"where the leading space is required, or the empty string if there is no such keyword in this dialect.StringgetCurrentTimestampSelectString()Retrieve the command used to retrieve the current timestamp from the database.SqmMultiTableMutationStrategygetFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)SelectItemReferenceStrategygetGroupBySelectItemReferenceStrategy()IdentityColumnSupportgetIdentityColumnSupport()Get the appropriateIdentityColumnSupportLimitHandlergetLimitHandler()Returns aLimitHandlerthat implements support forQuery.setMaxResults(int)andQuery.setFirstResult(int)for this dialect.NullOrderinggetNullOrdering()Returns the ordering of null.StringgetQueryHintString(String query, String hints)Apply a hint to the query.StringgetQuerySequencesString()Get the select command used retrieve the names of all sequences.SequenceInformationExtractorgetSequenceInformationExtractor()A source ofSequenceInformation.SequenceSupportgetSequenceSupport()SqlAstTranslatorFactorygetSqlAstTranslatorFactory()Return an SqlAstTranslatorFactory specific for the Dialect.TimeZoneSupportgetTimeZoneSupport()How the Dialect supports time zone types likeTypes.TIMESTAMP_WITH_TIMEZONE.intgetVersion()ViolatedConstraintNameExtractorgetViolatedConstraintNameExtractor()booleanhasDstBug()voidinitializeFunctionRegistry(QueryEngine queryEngine)Initialize the given registry with any dialect-specific functions.booleanisCurrentTimestampSelectStringCallable()Should the value returned byDialect.getCurrentTimestampSelectString()be treated as callable.booleanrequiresParensForTupleDistinctCounts()IfDialect.supportsTupleDistinctCounts()is true, does the Dialect require the tuple to be wrapped with parens?booleansupportsCurrentTimestampSelection()Does this dialect support a way to retrieve the database's current timestamp value?booleansupportsFetchClause(FetchClauseType type)Does this dialect support the given fetch clause type.booleansupportsIfExistsAfterAlterTable()For an "alter table", can the phrase "if exists" be applied?booleansupportsIfExistsAfterTableName()For dropping a table, can the phrase "if exists" be applied after the table name?booleansupportsIfExistsBeforeConstraintName()For dropping a constraint with an "alter table", can the phrase "if exists" be applied before the constraint name?booleansupportsIfExistsBeforeTableName()For dropping a table, can the phrase "if exists" be applied before the table name?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...booleansupportsOffsetInSubquery()Does this dialect support offset in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1 offset 1)booleansupportsTemporalLiteralOffset()Whether the Dialect supports timezone offset in temporal literals.booleansupportsTupleCounts()Does this dialect support `count(a,b)`?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.StringtranslateExtractField(TemporalUnit unit)Return the name used to identify the given field as an argument to theextract()function, or of this dialect'sequivalentfunction.-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendBinaryLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, binaryToDecimalPrecision, buildIdentifierHelper, canCreateCatalog, canCreateSchema, castPattern, closeQuote, currentDate, currentLocalTime, currentLocalTimestamp, defaultScrollMode, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLobAsLastValue, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBooleanCheckCondition, getCallableStatementSupport, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCurrentSchemaCommand, getDefaultBatchLoadSizingStrategy, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDoublePrecision, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getEnumCheckCondition, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getHibernateTypeName, getHibernateTypeName, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNationalizationSupport, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getNullColumnString, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getRawTypeName, getRawTypeName, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSizeStrategy, getSqmTranslatorFactory, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isAnsiNullOn, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerDefaultKeywords, registerHibernateType, registerHibernateType, registerKeyword, registerKeywords, registerResultSetOutParameter, registerResultSetOutParameter, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, resolveSqlTypeDescriptor, resolveSqlTypeLength, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFractionalTimestampArithmetic, supportsIfExistsAfterConstraintName, supportsJdbcConnectionLobCreation, supportsLockTimeouts, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSkipLocked, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, toBooleanValueString, toString, transformSelectString, translateDurationField, trimPattern, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Constructor Detail
-
H2Dialect
public H2Dialect(DialectResolutionInfo info)
-
H2Dialect
public H2Dialect()
-
H2Dialect
public H2Dialect(int version, int buildId)
-
H2Dialect
public H2Dialect(int version)
-
-
Method Detail
-
contributeTypes
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Description copied from class:DialectAllows the Dialect to contribute additional types- Overrides:
contributeTypesin classDialect- Parameters:
typeContributions- Callback to contribute the typesserviceRegistry- The service registry
-
hasDstBug
public boolean hasDstBug()
-
getVersion
public int getVersion()
- Specified by:
getVersionin classDialect
-
initializeFunctionRegistry
public void initializeFunctionRegistry(QueryEngine queryEngine)
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
- 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])
- 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])
- sign(arg)
- sin(arg)
- cos(arg)
- tan(arg)
- asin(arg)
- acos(arg)
- atan(arg)
- atan2(arg0, arg1)
- round(arg0, arg1)
- least(arg0, arg1, ...)
- greatest(arg0, arg1, ...)
- format(datetime as pattern)
- str(arg) - synonym of cast(a as String)
- ifnull(arg0, arg1) - synonym of coalesce(a, b)
- second(arg) - synonym of extract(second from a)
- minute(arg) - synonym of extract(minute from a)
- hour(arg) - synonym of extract(hour from a)
- day(arg) - synonym of extract(day from a)
- month(arg) - synonym of extract(month from a)
- year(arg) - synonym of extract(year from a)
- Overrides:
initializeFunctionRegistryin 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
-
currentTimestampWithTimeZone
public String currentTimestampWithTimeZone()
Description copied from class:DialectTranslation of the HQLoffset_datetimefunction, which maps to the Java typejava.time.OffsetDateTimewhich is a datetime with a time zone. This in principle correctly maps to the ANSI SQLcurrent_timestampwhich has the typeTIMESTAMP WITH TIME ZONE.- Overrides:
currentTimestampWithTimeZonein classDialect
-
getSqlAstTranslatorFactory
public SqlAstTranslatorFactory getSqlAstTranslatorFactory()
Description copied from class:DialectReturn an SqlAstTranslatorFactory specific for the Dialect. Returnnullto use Hibernate's standard translator.- Overrides:
getSqlAstTranslatorFactoryin classDialect- See Also:
StandardSqlAstTranslatorFactory,JdbcEnvironment.getSqlAstTranslatorFactory()
-
extractPattern
public String extractPattern(TemporalUnit unit)
In H2, the extract() function does not return fractional seconds for the the fieldTemporalUnit.SECOND. We work around this here with two calls to extract().- Overrides:
extractPatternin classDialect- Parameters:
unit- the first argument
-
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
-
supportsTemporalLiteralOffset
public boolean supportsTemporalLiteralOffset()
Description copied from class:DialectWhether the Dialect supports timezone offset in temporal literals.- Overrides:
supportsTemporalLiteralOffsetin classDialect
-
getTimeZoneSupport
public TimeZoneSupport getTimeZoneSupport()
Description copied from class:DialectHow the Dialect supports time zone types likeTypes.TIMESTAMP_WITH_TIMEZONE.- Overrides:
getTimeZoneSupportin classDialect
-
appendBooleanValueString
public void appendBooleanValueString(SqlAppender appender, boolean bool)
- Overrides:
appendBooleanValueStringin classDialect
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:DialectReturns aLimitHandlerthat implements support forQuery.setMaxResults(int)andQuery.setFirstResult(int)for this dialect.- Overrides:
getLimitHandlerin classDialect
-
supportsIfExistsAfterTableName
public boolean supportsIfExistsAfterTableName()
Description copied from class:DialectFor dropping a table, can the phrase "if exists" be applied after the table name? NOTE : Only one or the other (or neither) of this andDialect.supportsIfExistsBeforeTableName()should return true- Overrides:
supportsIfExistsAfterTableNamein classDialect- Returns:
trueif the "if exists" can be applied after the table name
-
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()
Description copied from class:DialectFor dropping a table, can the phrase "if exists" be applied before the table name? NOTE : Only one or the other (or neither) of this andDialect.supportsIfExistsAfterTableName()should return true- Overrides:
supportsIfExistsBeforeTableNamein classDialect- Returns:
trueif the "if exists" can be applied before the table name
-
supportsIfExistsAfterAlterTable
public boolean supportsIfExistsAfterAlterTable()
Description copied from class:DialectFor an "alter table", can the phrase "if exists" be applied?- Overrides:
supportsIfExistsAfterAlterTablein classDialect- Returns:
trueif the "if exists" can be applied after ALTER TABLE
-
supportsIfExistsBeforeConstraintName
public boolean supportsIfExistsBeforeConstraintName()
Description copied from class:DialectFor dropping a constraint with an "alter table", can the phrase "if exists" be applied before the constraint name? NOTE : Only one or the other (or neither) of this andDialect.supportsIfExistsAfterConstraintName()should return true- Overrides:
supportsIfExistsBeforeConstraintNamein classDialect- Returns:
trueif the "if exists" can be applied before the constraint name
-
getCascadeConstraintsString
public String getCascadeConstraintsString()
Description copied from class:DialectThe keyword that specifies that adrop tableoperation should be cascaded to its constraints, typically" cascade"where the leading space is required, or the empty string if there is no such keyword in this dialect.- Overrides:
getCascadeConstraintsStringin classDialect- Returns:
- The cascade drop keyword, if any, with a leading space
-
dropConstraints
public boolean dropConstraints()
Description copied from class:DialectDo we need to drop constraints before dropping tables in this dialect?- Overrides:
dropConstraintsin classDialect- Returns:
- True if constraints must be dropped prior to dropping the table; false otherwise.
-
getSequenceSupport
public SequenceSupport getSequenceSupport()
- Overrides:
getSequenceSupportin classDialect
-
getQuerySequencesString
public String getQuerySequencesString()
Description copied from class:DialectGet the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesStringin classDialect- Returns:
- The select command; or null if sequences are not supported.
- See Also:
org.hibernate.tool.hbm2ddl.SchemaUpdate
-
getSequenceInformationExtractor
public SequenceInformationExtractor getSequenceInformationExtractor()
Description copied from class:DialectA source ofSequenceInformation.- Overrides:
getSequenceInformationExtractorin classDialect
-
getNullOrdering
public NullOrdering getNullOrdering()
Description copied from class:DialectReturns the ordering of null.- Overrides:
getNullOrderingin classDialect
-
getFallbackSqmMutationStrategy
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext)
- Overrides:
getFallbackSqmMutationStrategyin classDialect
-
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 defaultSQLExceptionConverterwill 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
- Overrides:
buildSQLExceptionConversionDelegatein classDialect- Returns:
- The SQLExceptionConversionDelegate for this dialect
-
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()
Description copied from class:DialectDoes this dialect support a way to retrieve the database's current timestamp value?- Overrides:
supportsCurrentTimestampSelectionin classDialect- Returns:
- True if the current timestamp can be retrieved; false otherwise.
-
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()
Description copied from class:DialectShould the value returned byDialect.getCurrentTimestampSelectString()be treated as callable. Typically this indicates that JDBC escape syntax is being used...- Overrides:
isCurrentTimestampSelectStringCallablein classDialect- Returns:
- True if the
Dialect.getCurrentTimestampSelectString()return is callable; false otherwise.
-
getCurrentTimestampSelectString
public String getCurrentTimestampSelectString()
Description copied from class:DialectRetrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectStringin classDialect- Returns:
- The command.
-
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 notDialect.supportsExpectedLobUsagePattern().- Overrides:
supportsLobValueChangePropagationin classDialect- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
supportsTupleCounts
public boolean supportsTupleCounts()
Description copied from class:DialectDoes this dialect support `count(a,b)`?- Overrides:
supportsTupleCountsin classDialect- Returns:
- True if the database supports counting tuples; false otherwise.
-
requiresParensForTupleDistinctCounts
public boolean requiresParensForTupleDistinctCounts()
Description copied from class:DialectIfDialect.supportsTupleDistinctCounts()is true, does the Dialect require the tuple to be wrapped with parens?- Overrides:
requiresParensForTupleDistinctCountsin classDialect- Returns:
- boolean
-
doesReadCommittedCauseWritersToBlockReaders
public boolean doesReadCommittedCauseWritersToBlockReaders()
Description copied from class:DialectFor the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?- Overrides:
doesReadCommittedCauseWritersToBlockReadersin classDialect- Returns:
- True if writers block readers to achieve READ_COMMITTED; false otherwise.
-
getGroupBySelectItemReferenceStrategy
public SelectItemReferenceStrategy getGroupBySelectItemReferenceStrategy()
- Overrides:
getGroupBySelectItemReferenceStrategyin classDialect
-
supportsOffsetInSubquery
public boolean supportsOffsetInSubquery()
Description copied from class:DialectDoes this dialect support offset in subqueries? Ex: select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1 offset 1)- Overrides:
supportsOffsetInSubqueryin classDialect- Returns:
- boolean
-
supportsFetchClause
public boolean supportsFetchClause(FetchClauseType type)
Description copied from class:DialectDoes this dialect support the given fetch clause type.- Overrides:
supportsFetchClausein classDialect- Parameters:
type- The fetch clause type- Returns:
trueif the underlying database supports the given fetch clause type,falseotherwise. The default isfalse.
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:DialectGet the appropriateIdentityColumnSupport- Overrides:
getIdentityColumnSupportin classDialect- Returns:
- the IdentityColumnSupport
-
getQueryHintString
public String getQueryHintString(String query, String hints)
Description copied from class:DialectApply a hint to the query. The entire query is provided, allowing the Dialect full control over the placement and syntax of the hint. By default, ignore the hint and simply return the query.- Overrides:
getQueryHintStringin classDialect- Parameters:
query- The query to which to apply the hint.hints- The hints to apply- Returns:
- The modified SQL
-
appendDatetimeFormat
public void appendDatetimeFormat(SqlAppender appender, String format)
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 all of the 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
- Overrides:
appendDatetimeFormatin classDialect
-
translateExtractField
public String translateExtractField(TemporalUnit unit)
Description copied from class:DialectReturn the name used to identify the given field as an argument to theextract()function, or of this dialect'sequivalentfunction.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
-
-