Class Dialect
- All Implemented Interfaces:
FunctionContributor,TypeContributor,ConversionContext
- Direct Known Subclasses:
AbstractTransactSQLDialect,CockroachDialect,DB2Dialect,GenericDialect,H2Dialect,HANADialect,HSQLDialect,MySQLDialect,OracleDialect,PostgreSQLDialect,SpannerDialect
PostgreSQLDialect implements supportfor PostgreSQL, andMySQLDialect implements support for MySQL.A subclass must provide a public constructor with a single parameterof typeDialectResolutionInfo. Alternatively, for purposes ofbackward compatibility with older versions of Hibernate, a constructorwith no parameters is also allowed.
Almost every subclass must, as a bare minimum, override at least:
columnType(int)to define a mapping from SQLtype codes to database column types, andinitializeFunctionRegistry(FunctionContributions)to register mappings for standard HQL functions with theSqmFunctionRegistry.
A subclass representing a dialect of SQL which deviates significantlyfrom ANSI SQL will certainly override many additional operations.
Subclasses should be thread-safe and immutable.
Since Hibernate 6, a single subclass ofDialect represents allreleases of a given product-specific SQL dialect. The version of thedatabase is exposed at runtime via theDialectResolutionInfopassed to the constructor, and by thegetVersion() property.
Programs using Hibernate should migrate away from the use of versioneddialect classes like, for example,MySQL8Dialect. Theseclasses are now deprecated and will be removed in a future release.
A customDialect may be specified using the configurationproperty"hibernate.dialect", butfor supported databases this property is unnecessary, and Hibernatewill select the correctDialect based on the JDBC URL andDialectResolutionInfo.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacePluggable strategy for determining theSizeto use forcolumns of a given SQL type.classField Summary
FieldsModifier and TypeFieldDescriptionstatic finalStringCharacters used as closing for quoting SQL identifiersprotected static finalString[]protected static finalLobMergeStrategyALobMergeStrategyrepresenting the legacy behavior of Hibernate.protected static final doubleprotected static finalLobMergeStrategyALobMergeStrategybased on creating a new LOB locator.static finalStringCharacters used as opening for quoting SQL identifiersprotected finalMultiKeyLoadSizingStrategyprotected static finalLobMergeStrategyALobMergeStrategybased on transferring contents using streams.protected static finalString[]Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDialect()Deprecated.provide aDatabaseVersionprotectedDialect(DatabaseVersion version) protectedDialect(DialectResolutionInfo info) Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this dialect require that the columns listed inpartition byalso occur in the primary key,when defining table partitioning?addSqlHintOrComment(String sql,QueryOptions queryOptions, boolean commentsEnabled) Modify the SQL, adding hints or comments, if necessary.staticStringaddUseIndexQueryHint(String query,String hints) Adds anINDEXquery hint as follows:voidappendArrayLiteral(SqlAppender appender,Object[] literal,JdbcLiteralFormatter<Object> elementFormatter,WrapperOptions wrapperOptions) Append an array literal with the given elements to the givenSqlAppender.voidappendBinaryLiteral(SqlAppender appender, byte[] bytes) Append a binary literal to the givenSqlAppender.voidappendBooleanValueString(SqlAppender appender, boolean bool) Append the SQL literal expression representing the given booleanvalue to the givenSqlAppender.appendCheckConstraintOptions(CheckConstraint checkConstraint,String sqlCheckConstraint) Append theoptions to the given DDLstring declaring a SQLcheckconstraint.voidappendDatetimeFormat(SqlAppender appender,String format) Translate the given datetime format string fromthe pattern language defined by Java'sDateTimeFormattertowhatever pattern language is understood by thenative datetime formatting function for thisdatabase (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.voidappendIntervalLiteral(SqlAppender appender,Duration literal) Append a literal SQLintervalrepresenting the given JavaDuration.voidappendIntervalLiteral(SqlAppender appender,TemporalAmount literal) Append a literal SQLintervalrepresenting the given JavaTemporalAmount.voidappendLiteral(SqlAppender appender,String literal) Append a literal string to the givenSqlAppender.appendLockHint(LockOptions lockOptions,String tableName) Some dialects support an alternative means toSELECT FOR UPDATE,whereby a "lock hint" is appended to the table name in thefromclause.voidappendUUIDLiteral(SqlAppender appender,UUID literal) Append a literal SQLuuidrepresenting the given JavaUUID.applyLocksToSql(String sql,LockOptions aliasedLockOptions,Map<String, String[]> keyColumnNames) Modifies the given SQL, applying the appropriate updates for the specifiedlock modes and key columns.voidaugmentPhysicalTableTypes(List<String> tableTypesList) voidaugmentRecognizedTableTypes(List<String> tableTypesList) buildIdentifierHelper(IdentifierHelperBuilder builder, @NullableDatabaseMetaData metadata) TheIdentifierHelperindicated by this dialect for handling identifier conversions.protectedLockingClauseStrategybuildLockingClauseStrategy(org.hibernate.sql.ast.internal.PessimisticLockKind lockKind,RowLockStrategy rowLockStrategy,LockOptions lockOptions,Set<NavigablePath> rootPathsForLocking) protectedLockingStrategybuildOptimisticForceIncrementStrategy(EntityPersister lockable,LockMode lockMode) protectedLockingStrategybuildOptimisticStrategy(EntityPersister lockable,LockMode lockMode) protectedLockingStrategybuildPessimisticForceIncrementStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) protectedLockingStrategybuildPessimisticReadStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) protectedLockingStrategybuildPessimisticWriteStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) protectedLockingStrategybuildReadStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) An instance ofSQLExceptionConversionDelegatefor interpretingdialect-specificerror orSQLState codes.protectedStringbuildStringToBooleanCast(String trueValue,String falseValue) protectedStringbuildStringToBooleanCastDecode(String trueValue,String falseValue) protectedStringbuildStringToBooleanDecode(String trueValue,String falseValue) booleanDoes thetruncate tablestatement accept multiple tables?booleanDoes this dialect support creating and dropping catalogs?booleanDoes this dialect support creating and dropping schema?booleanIs there some way to disable foreign key constraint checking whiletruncating tables? (If there's no way to do it, and if we can'tbatch truncate, we must drop andrecreate the constraints instead.)castPattern(CastType from,CastType to) Obtain a pattern for the SQL equivalent to acast()function call.protectedStringcastType(int sqlTypeCode) The SQL type to use incast( ... as ... )expressions whencasting to the target type represented by the given JDBC type code.protected voidcharThe character specific to this dialect used to close a quoted identifier.protectedStringcolumnType(int sqlTypeCode) voidcontribute(TypeContributions typeContributions,ServiceRegistry serviceRegistry) Contribute typesvoidcontributeFunctions(FunctionContributions functionContributions) Contribute functionsvoidcontributeTypes(TypeContributions typeContributions,ServiceRegistry serviceRegistry) A callback which allows theDialectto contribute types.createOptionalTableUpdateOperation(EntityMutationTarget mutationTarget, org.hibernate.sql.model.internal.OptionalTableUpdate optionalTableUpdate,SessionFactoryImplementor factory) Create aMutationOperationfor a updating an optional tableTranslation of the HQLlocal_timefunction, which maps tothe Java typeLocalTimewhich is a time with notime zone.Translation of the HQLlocal_datetimefunction, which mapsto the Java typeLocalDateTimewhich is a datetimewith no time zone.Translation of the HQL/JPQLcurrent_timefunction, whichmaps to the Java typeTimewhich is a time withno time zone.Translation of the HQL/JPQLcurrent_timestampfunction,which maps to the Java typeTimestampwhich isa datetime with no time zone.Translation of the HQLoffset_datetimefunction, which mapsto the Java typeOffsetDateTimewhich is a datetimewith a time zone.A defaultScrollModeto be used byQuery.scroll().Determine the database version, as precise as possible and using Dialect-specific techniques,from aDialectResolutionInfoobject.booleanFor the underlying database, isREAD_COMMITTEDisolationimplemented by forcing readers to wait for write locks to be released?booleanFor the underlying database, isREPEATABLE_READisolationimplemented by forcing writers to wait for read locks to be released?booleanDoes this dialect round a temporal when converting from a precision higher to a lower one?booleanDo we need to drop constraints before dropping tables in this dialect?booleanequivalentTypes(int typeCode1, int typeCode2) Do the given JDBC type codes, as defined inTypesrepresentessentially the same type in this dialect of SQL?staticStringescapeComment(String comment) Perform necessary character escaping on the text of the comment.extractPattern(TemporalUnit unit) Obtain a pattern for the SQL equivalent to anextract()function call.booleanMust LOB values occur last in inserts and updates?generatedAs(String generatedAs) Thegenerated asclause, or similar, for generated columndeclarations in DDL statements.The subcommand of thealter tablecommand used to adda column to a table, usuallyadd columnoradd.The syntax for the suffix used to add a column to a table.getAddForeignKeyConstraintString(String constraintName,String foreignKeyDefinition) The syntax used to add a foreign key constraint to a table,given the definition of the foreign key as a string.getAddForeignKeyConstraintString(String constraintName,String[] foreignKey,String referencedTable,String[] primaryKey, boolean referencesPrimaryKey) The syntax used to add a foreign key constraint to a table,with the referenced key columns explicitly specified.getAddPrimaryKeyConstraintString(String constraintName) The syntax used to add a primary key constraint to a table.How does this dialect support aggregate types likeSqlTypes.STRUCT.getAlterColumnTypeString(String columnName,String columnType,String columnDefinition) The fragment of analter tablecommand which modifies acolumn type, or null if column types cannot be modified.getAlterTableString(String tableName) The command used to alter a table with the given name, usuallyalter table tab_nameoralter table tab_name if exists.getArrayTypeName(String javaElementTypeName,String elementTypeName,Integer maxLength) The SQL type name for the array type with elements of the given type name.The strategy used to determine the appropriate number of keysto load in a single SQL query with batch-fetch loading.A command to execute before dropping tables.TheCallableStatementSupportfor this database.The keyword that specifies that adrop tableoperationshould be cascaded to its constraints, typically" cascade"where the leading space is required, orthe empty string if there is no such keyword in this dialect.The name of the SQL operator that performs case-insensitiveLIKEcomparisons.getCheckCondition(String columnName, long[] values) Deprecated, for removal: This API element is subject to removal in a future version.usegetCheckCondition(String, Long[])insteadgetCheckCondition(String columnName, long min, long max) Render a SQL check condition for a column that represents an enumerated value.getCheckCondition(String columnName,Class<? extendsEnum<?>> enumType) getCheckCondition(String columnName,Long[] values) Render a SQL check condition for a column that represents an enumerated valueby itsordinal representationor a given list of values.getCheckCondition(String columnName,String[] values) Render a SQL check condition for a column that represents an enumerated valueby itsstring representationor a given list of values (with NULL value allowed).getCheckCondition(String columnName,Collection<?> valueSet,JdbcType jdbcType) Generate a SQLcheckcondition for the given column,constraining to the given values.getCheckConstraintString(CheckConstraint checkConstraint) Render a SQL check condition forCheckConstraintAColumnAliasExtractor, usually justResultSetMetaData.getColumnLabel(int).getColumnComment(String comment) Get the comment into a form supported for column definition.String[]getCreateCatalogCommand(String catalogName) Get the SQL command used to create the named catalog.String[]getCreateEnumTypeCommand(Class<? extendsEnum<?>> enumType) String[]getCreateEnumTypeCommand(String name,String[] values) getCreateIndexString(boolean unique) The command used to create an index, usuallycreate indexorcreate unique index.getCreateIndexTail(boolean unique,List<Column> columns) A string to be appended to the end of thecreate indexcommand, usually to specify thatnullvalues are to beconsidered distinct.Slight variation ongetCreateTableString().String[]getCreateSchemaCommand(String schemaName) Get the SQL command used to create the named schema.The command used to create a table, usuallycreate table.getCreateTemporaryTableColumnAnnotation(int sqlTypeCode) Deprecated, for removal: This API element is subject to removal in a future version.An arbitrary extension to append to the end of the UDTcreate typecommand.The kind of user-defined type to create, or the emptystring if this does not need to be specified.Some dialects require a not null primaryTable filter.Deprecated.Since Hibernate now baselines on Java 17,Connection.getSchema()is always available directly.The command used to retrieve the current timestamp from the database.intThis is the default precision for a generated column ofexact numeric typeDECIMALorNUMERICmapped to aBigIntegerorBigDecimal.intThis is the default scale for a generated column of typeINTERVAL SECONDmappedto aDuration.longbooleanThe default value to use for the configuration property"hibernate.jdbc.lob.non_contextual_creation".@NullableStringReturns the default name of the ordinality column for a set-returning functionif it supports that, otherwise returnsnull.Retrieve a set of default Hibernate properties for this database.intThe default value to use for the configuration property"hibernate.jdbc.batch_size".intThis is the default precision for a generated column oftypeTIMESTAMPmapped to aTimestamporLocalDateTime.booleanThe default value to use for the configuration property"hibernate.jdbc.use_get_generated_keys".A SQL statement that temporarily disables foreign key constraintchecking for all tables.getDisableConstraintStatement(String tableName,String name) A SQL statement that temporarily disables checking of the givenforeign key constraint.Get the minimumDmlTargetColumnQualifierSupportrequired by this dialect.intThis is the default precision for a generatedcolumn mapped to a JavaDoubleordouble.String[]getDropCatalogCommand(String catalogName) Get the SQL command used to drop the named catalog.String[]getDropEnumTypeCommand(Class<? extendsEnum<?>> enumType) String[]getDropEnumTypeCommand(String name) The subcommand of thealter tablecommand used to dropa foreign key constraint, usuallydrop constraint.String[]getDropSchemaCommand(String schemaName) Get the SQL command used to drop the named schema.getDropTableString(String tableName) Deprecated.No longer usedThe subcommand of thealter tablecommand used to dropa unique key constraint.getDual()Returns a table expression that has one row.A SQL statement that re-enables foreign key constraint checking forall tables.getEnableConstraintStatement(String tableName,String name) A SQL statement that re-enables checking of the given foreign keyconstraint.getEnumTypeDeclaration(Class<? extendsEnum<?>> enumType) getEnumTypeDeclaration(String name,String[] values) If this database has a special MySQL-styleenumcolumn type,return the type declaration for the given enumeration of values.getFallbackSchemaManagementTool(Map<String, Object> configurationValues,ServiceRegistryImplementor registry) TheSchemaManagementToolto use if none is explicitly specified.getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor,RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor,RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().intThis is the default precision for a generatedcolumn mapped to a JavaFloatorfloat.Retrieves theFOR UPDATE NOWAITsyntax specific to this dialect.getForUpdateNowaitString(String aliases) Get theFOR UPDATE OF column_list NOWAITfragment appropriatefor this dialect, given the aliases of the columns to be write locked.Retrieves theFOR UPDATE SKIP LOCKEDsyntax specific to this dialect.getForUpdateSkipLockedString(String aliases) Get theFOR UPDATE OF column_list SKIP LOCKEDfragment appropriatefor this dialect, given the aliases of the columns to be write locked.Get the string to append toSELECTstatements toacquire pessimistic UPGRADE locks for this dialect.getForUpdateString(Timeout timeout) Retrieves theFOR UPDATE WAIT xsyntax specific to this dialect.getForUpdateString(String aliases) Get theFOR UPDATE OF column_listfragment appropriatefor this dialect, given the aliases of the columns to be writelocked.getForUpdateString(String aliases,LockOptions lockOptions) Get theFOR UPDATE OForFOR SHARE OFfragmentappropriate for this dialect, given the aliases of the columnsto be locked.getForUpdateString(LockMode lockMode) Given aLockMode, determine the appropriatefor updatefragment to use to obtain the lock.getForUpdateString(LockMode lockMode, int timeout) Deprecated.UsegetForUpdateString(LockMode,Timeout) insteadgetForUpdateString(LockMode lockMode,Timeout timeout) Given alock level and timeout,determine the appropriatefor updatefragment touse to obtain the lock.getForUpdateString(LockOptions lockOptions) Given a set ofLockOptions(lock level, timeout),determine the appropriatefor updatefragment touse to obtain the lock.longThe "native" precision for arithmetic with datetimesand day-to-second durations.Get this dialect's level of support for primary key functional dependency analysiswithinGROUP BYandORDER BYclauses.@NullableTemporaryTableStrategyThe strategy to use for global temporary tables.Determine how selected items are referenced in thegroup byclause.Return anHqlTranslatorspecific to this dialect, ornullto use the standard translator.Get the appropriateIdentityColumnSupportfor this dialect.intReturn the limit that the underlying database places on the number ofelements in anINpredicate.getInformationExtractor(ExtractionContext extractionContext) AInformationExtractorwhich is able to extracttable, primary key, foreign key, index information etc.The keywords of this SQL dialect.Obtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).Get theLobMergeStrategyto use,NEW_LOCATOR_LOB_MERGE_STRATEGYby default.@NullableTemporaryTableStrategyThe strategy to use for local temporary tables.getLockingClauseStrategy(QuerySpec querySpec,LockOptions lockOptions) Strategy for handlinglocking clauseas part ofSqlAstTranslator.getLockingStrategy(EntityPersister lockable,LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.getLockingStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) ALockingStrategywhich is able to acquire a database-levellock with the specifiedlevel.Access to various details and operations related to thisDialect's support for pessimistic locking.getLockRowIdentifier(LockMode lockMode) Obtain aRowLockStrategyfor the givenLockMode.The name of the SQL function that transforms a string to lowercase,almost alwayslower.intWhat is the maximum length Hibernate can use for generated aliases?intWhat is the maximum identifier length supported by this dialect?intThe longest possible length of aTypes.NVARCHAR-likecolumn.intThe biggest size value that can be supplied as argument to aTypes.NVARCHAR-like type.intThe longest possible length of aTypes.VARBINARY-likecolumn.intThe biggest size value that can be supplied as argument to aTypes.VARBINARY-like type.intThe longest possible length of aTypes.VARCHAR-likecolumn.intThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.protectedDatabaseVersionGet the version of the SQL dialect that is the minimum supported by this implementation.The strategy used to determine the appropriate number of keysto load in a single SQL query with multi-key loading.Determines whether this database requires the use of explicitlynationalized character (Unicode) data types.Deprecated, for removal: This API element is subject to removal in a future version.UsegetNativeValueGenerationStrategy() insteadSupport for native parameter markers.The native type of generation supported by this Dialect.Deprecated.Override the methodrenderInsertIntoNoColumns()on thetranslatorreturned by this dialect.The keyword used to specify a nullable column, usually"",but sometimes" null".getNullColumnString(String columnType) The keyword used to specify a nullable column of the given SQL type.Returns the default ordering of null.intReturn the limit that the underlying database places on the number of parametersthat can be defined for a PreparedStatement.The strategy to use for persistent temporary tables.Deprecated.intThe JDBCtype code to use for mappingproperties of basic Java array orCollectiontypes.intThe JDBCtype code to use for mappingproperties of Java typeboolean.getQueryHintString(String query,String hints) Apply a hint to the given SQL query.getQueryHintString(String query,List<String> hintList) Apply a hint to the given SQL query.Get theselectcommand used retrieve the names of all sequences.getReadLockString(int timeout) Deprecated.UsegetReadLockString(Timeout) instead.getReadLockString(Timeout timeout) Get the string to append toSELECTstatements toacquire READ locks for this dialect.getReadLockString(String aliases, int timeout) Deprecated.UsegetReadLockString(String, Timeout) instead.getReadLockString(String aliases,Timeout timeout) Get the string to append toSELECTstatements toacquire READ locks for this dialect, given the aliases ofthe columns to be read locked.Deprecated.UseLockingSupport.Metadata.getReadRowLockStrategy(),viagetLockingSupport(), instead.getResultSet(CallableStatement statement) Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom theOUTparameter.getResultSet(CallableStatement statement, int position) Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom the positionalOUTparameter.getResultSet(CallableStatement statement,String name) Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom the namedOUTparameter.getRowIdColumnString(String rowId) If this dialect requires that therowidcolumn bedeclared explicitly, return the DDL column definition.Get the strategy for determining the schema name from a JDBCConnection, usuallyDefaultSchemaNameResolver.getSelectClauseNullString(int sqlType,TypeConfiguration typeConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.getSelectClauseNullString(SqlTypedMapping sqlTypeMapping,TypeConfiguration typeConfiguration) Given a type mapping, return the expressionfor a literal null value of that type, to use in aselectclause.Get the command used to select a GUID from the database.ASequenceInformationExtractorwhich is able to extractSequenceInformationfrom the JDBC result set returned whengetQuerySequencesString()is executed.Get the appropriateSequenceSupportfor this dialect.A customDialect.SizeStrategyfor column types.Return aSqmTranslatorFactoryspecific to this dialect, ornullto use the standard translator.Deprecated, for removal: This API element is subject to removal in a future version.Get a schemaCleaner,usuallyStandardTableCleaner.getTableComment(String comment) Get the comment into a form supported for table definition.Get aTableMigrator,usuallyStandardTableMigrator.An arbitrary fragment appended to the end of thecreate tablestatement.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated.No dialect currently overrides this, so it's obsoleteDeprecated, for removal: This API element is subject to removal in a future version.Get aTemporaryTableExporter,usuallyStandardTemporaryTableExporter.Deprecated, for removal: This API element is subject to removal in a future version.protected intgetTimeoutInSeconds(int millis) Deprecated.UseTimeouts.getTimeoutInSeconds(int) instead.How the dialect supports time zone types likeTypes.TIMESTAMP_WITH_TIMEZONE.getTruncateTableStatement(String tableName) A SQL statement that truncates the given table.String[]getTruncateTableStatements(String[] tableNames) A SQL statement or statements that truncate the given tables.Get theUniqueDelegatesupported by this dialectgetUserDefinedTypeComment(String comment) Get the comment into a form supported for UDT definition.Get the version of the SQL dialect that is the target of this instance.AViolatedConstraintNameExtractorfor extracting the name ofa violated constraint from aSQLException.getWriteLockString(int timeout) Deprecated.UsegetWriteLockString(Timeout) instead.getWriteLockString(Timeout timeout) Get the string to append toSELECTstatements toacquire pessimistic WRITE locks for this dialect.getWriteLockString(String aliases, int timeout) Deprecated.UsegetWriteLockString(String, Timeout) instead.getWriteLockString(String aliases,Timeout timeout) Get the string to append toSELECTstatements toacquire WRITE locks for this dialect, given the aliases ofthe columns to be WRITE locked.Deprecated.UseLockingSupport.Metadata.getWriteRowLockStrategy(),viagetLockingSupport(), instead.booleanDoes this dialect support theALTER TABLEsyntax?booleanIs an explicit column type required forgenerated ascolumns?booleanDoes the database/driver have bug in deleting rows that refer toother rows being deleted in the same query?protected voidSet appropriate default values for configuration properties.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Initialize the given registry with any dialect-specific functions.booleanIs the command returned bygetCurrentTimestampSelectString()treated as callable?booleanReturn whether the dialect considers an empty string value to be null.booleanIs JDBC statement warning logging enabled by default?protected booleanisLob(int sqlTypeCode) charThe character specific to this dialect used to begin a quoted identifier.intordinal()Determines order in which the contributions will be applied(lowest ordinal first).protectedStringprependComment(String sql,String comment) Prepend a comment to the given SQL fragment.booleanDo we need to qualify index names with the schema name?Apply dialect-specific quoting if the given name is quoted using backticks.quoteCollation(String collation) Quote the given collation name if necessary.protected voidregisterColumnTypes(TypeContributions typeContributions,ServiceRegistry serviceRegistry) Register ANSI-standard column types using the length limits definedbygetMaxVarcharLength(),getMaxNVarcharLength(),andgetMaxVarbinaryLength().protected voidRegister the reserved words of ANSI-standard SQL as keywords.protected voidregisterKeyword(String word) Register a keyword.protected voidRegister the reserved wordsreportedby the JDBC driver as keywords.intregisterResultSetOutParameter(CallableStatement statement, int position) Registers a parameter capable of returning aResultSetby position, either anOUTparameter, or aREF_CURSORparameter as defined in Java 8.intregisterResultSetOutParameter(CallableStatement statement,String name) Registers a parameter capable of returning aResultSetby name, either anOUTparameter, or aREF_CURSORparameter as defined in Java 8.booleanDoes this dialect/database require casting of non-string argumentsin theconcat()function?booleanIs a list of column names required in thecreate viewstatement?booleanDoes this dialect require that integer divisions be wrapped incast()calls to tell the db parser the expected type.booleanIfsupportsTupleCounts()is true, does this dialect requirethe tuple to be delimited with parentheses?booleanIfsupportsTupleDistinctCounts()is true, does this dialectrequire the tuple to be delimited with parentheses?protectedIntegerresolveSqlTypeCode(String typeName,String baseTypeName,TypeConfiguration typeConfiguration) Resolves theSqlTypestype code for the given columntype name as reported by the database and the base type name(i.e.protectedIntegerresolveSqlTypeCode(String columnTypeName,TypeConfiguration typeConfiguration) Resolves theSqlTypestype code for the given columntype name as reported by the database, ornullif it can't be resolved.resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale,JdbcTypeRegistry jdbcTypeRegistry) Assigns an appropriateJdbcTypeto a column of a JDBCresult 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 theJDBCResultSetMetaData.The name of arowid-like pseudo-column whichacts as a high-performance row locator, or null ifthis dialect has no such pseudo-column.intThe JDBC type code of therowid-like pseudo-columnwhich acts as a high-performance row locator.booleanDoes this dialect strip trailing spaces from values storedin 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 SQL array constructor is supported.Whether this Dialect supportsbatch updates.booleanDoes this dialect support using a JDBC bind parameter as an argumentto a function or procedure call?booleanDoes this dialect support bindingnullforPreparedStatement.setObject(int, Object)?if it does, then call ofPreparedStatement.getParameterMetaData()could be eliminated for better performance.booleanDoes this dialect support bindingTypes.NULLforPreparedStatement.setNull(int, int)?If it does, then the call toPreparedStatement.getParameterMetaData()may be skipped forbetter performance.booleanbooleanDoes this dialect supporton deleteactions in foreign key definitions?booleanDoes this dialect support case-insensitiveLIKEcomparisons?booleanDoes this dialect support definition of cascade delete constraintswhich can cause circular chains?booleanDoes this dialect support column-level check constraints?booleanDoes this dialect support commenting on tables and columns?booleanDoes this dialect support theconflictclause for insert statementsthat appear in a CTE?booleanIs thecross joinsyntax supported?booleanDoes this dialect support some way to retrieve the current timestampvalue from the database?booleanDoes this dialect support some kind ofdistinct frompredicate?booleanbooleanDoes the dialect support an exists statement in the select clause?boolean"Expected" LOB usage pattern is such that I can perform an insert viaprepared statement with a parameter binding for a LOB value withoutcrazy casting to JDBC driver implementation-specific classes.booleanDoes this dialect support the givenFETCHclause type.booleanWhether the FILTER clause for aggregate functions is supported.booleanDeprecated.See notes onLockingSupport.Metadata.supportsForUpdate()booleanWhether the database supports adding a fractional intervalto a timestamp, for exampletimestamp + 0.5 second.booleanDoes this dialect support thefromclause for update statements?booleanFor analter table, can the phraseif existsbeapplied?booleanFor dropping a constraint with analter table, can thephraseif existsbe applied after the constraint name?booleanFor dropping a table, can the phraseif existsbeapplied after the table name?booleanFor dropping a type, can the phraseif existsbeapplied after the type name?booleanFor dropping a constraint with analter tablestatement,can the phraseif existsbe applied before the constraintname?booleanFor dropping a table, can the phraseif existsbeapplied before the table name?booleanFor dropping a type, can the phraseif existsbeapplied before the type name?booleanDoes this dialect fully support returning arbitrary generated column valuesafter execution of aninsertstatement, using native SQL syntax?booleanDoes this dialect fully support returning arbitrary generated column valuesafter execution of aninsertstatement, using the JDBC methodConnection.prepareStatement(String, String[]).booleanDoes this dialect supports returning theRowIdcolumnafter execution of aninsertstatement, using native SQL syntax?booleanbooleanDoes this dialect support theis trueandis falseoperators?booleansupportsJdbcConnectionLobCreation(DatabaseMetaData databaseMetaData) Check whether the JDBCConnectionsupports creating LOBs viaConnection.createBlob(),Connection.createNClob(), orConnection.createClob().booleanIf the dialect supports using joins in mutation statement subquerythat could also use columns from the mutation target tablebooleanbooleanDoes this dialect support the SQLlateralkeyword or aproprietary alternative?booleanDoes 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.booleanDeprecated.UseLockingSupport.Metadata.getPessimisticLockStyle(),viagetLockingSupport(), instead.booleanCheck whether the JDBC driver allows setting LOBs viaPreparedStatement.setBytes(int, byte[]),PreparedStatement.setNString(int, String), orPreparedStatement.setString(int, String)APIs.booleanDoes this dialect support named column-level check constraints?booleansupportsNamedParameters(DatabaseMetaData databaseMetaData) booleanChecks whether the JDBC driver implements methods for handling nationalized character data typesResultSet.getNString(int)/PreparedStatement.setNString(int, String),ResultSet.getNClob(int)/PreparedStatement.setNClob(int, NClob),ResultSet.getNCharacterStream(int)/PreparedStatement.setNCharacterStream(int, Reader, long)booleanbooleanWhether the SQL with clause is supported within a CTE.booleanIs theINSERTstatement is allowed to contain no columns?booleanDoes this dialect support insert, update, and delete statementswith Common Table Expressions (CTEs)?booleanDeprecated.See notes onLockingSupport.Metadata.supportsNoWait()booleanDoes this dialect supportnulls firstandnulls last?booleanDoes this dialect supportoffsetin subqueries?booleanDoes this dialect support theorder byclause in subqueries?booleanDoes this dialect support references to result variables(i.e, select items) by column positions (1-origin) as definedby the select clause?booleanDeprecated.booleanDoes is dialect supportpartition byin windowfunctions?protected booleanWhether a predicate likea > 0can appear in an expressioncontext, for example, in aselectlist item.booleanDoes this dialect/database support recursive CTEs?booleanWhether the SQL cycle clause is supported, which can be used for recursive CTEs.booleanWhether the SQL cycle clause supports the using sub-clause.booleanWhether the SQL search clause is supported, which can be used for recursive CTEs.Whether this Dialect supports the JDBCTypes.REF_CURSORtype.booleanDoes this dialect support asking the result set its positioninginformation on forward-only cursors?booleanWhether the SQL row constructor is supported.booleanIs this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax withis distinct fromandis not distinct fromoperators.booleanIs this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax with<,>,≤and≥operators.booleanIs this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax.booleanIf the dialect supportsrow values,does it offer such support in IN lists as well?booleanIf the dialect supportsrow values,does it offer such support in IN subqueries as well?booleanIs this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax with quantified predicates.booleanbooleanDeprecated.See notes onLockingSupport.Metadata.supportsSkipLocked()booleanDoes this database have native support for ANSI SQL standard arrays whichare expressed in terms of the element type name:integer array.booleanDoes this dialect have an ANSI SQLcurrent_timestampfunction?booleanDoes this dialect support subqueries in theselectclause?booleanDoes this dialect support referencing the table being mutated in asubquery? The "table being mutated" is the table referenced in anupdate or delete query.booleanIs a subselect supported as the left-hand side (LHS) of anINpredicates?booleanDoes this dialect support table-level check constraints?booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDoes this dialect supports timezone offsets in temporal literals.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.UsegetLocalTemporaryTableStrategy()andgetGlobalTemporaryTableStrategy()to check insteadbooleanDoes this dialect support truncation of values to a specified lengthvia acast?booleanDoes this dialect supportcount(a,b)?booleanDoes this dialect supportcount(distinct a,b)?booleanIs it supported to materialize a LOB locator outside the transactionin which it was created?booleanDoes this dialect supportUNION ALL?booleanDoes this dialect supportUNIONin a subquery.booleanDoes this dialect fully support returning arbitrary generated column valuesafter execution of anupdatestatement, using native SQL syntax?booleanDoes the database support user defined types?booleanDoes this dialect supportvalueslists of formVALUES (1), (2), (3)?booleanDoes this dialect supportvalueslists of formVALUES (1), (2), (3)in insert statements?booleanDeprecated.See notes onLockingSupport.Metadata.supportsWait()booleanDoes this dialect support window functions likerow_number() over (..)?booleanWhether the SQL with clause is supported.booleanWhether the SQL with clause is supported within 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.toBooleanValueString(boolean bool) The SQL literal expression representing the given boolean value.toQuotedIdentifier(String name) Apply dialect-specific quoting.toString()transformSelectString(String select) Meant as a means for end users to affect the select strings being sentto the database and perhaps manipulate them in some fashion.Return the name used to identify the given unit ofduration as an argument to#timestampadd()or#timestampdiff(), or of this dialect'sequivalentfunctions.Return the name used to identify the given fieldas an argument to theextract()function,or of this dialect'sequivalentfunction.trimPattern(TrimSpec specification, boolean isWhitespace) Obtain a pattern for the SQL equivalent to atrim()function call.booleanDoes this dialect require unquoting identifiers when passing them to theConnection.prepareStatement(String, String[])JDBC method.booleanDoes this database prefer to use array types for multi-valued parameters.booleanShouldBlob,Clob, andNClobbe created solelyusingConnection.createBlob(),Connection.createClob(),andConnection.createNClob(), instead of allowing the use ofour own implementations.booleanDoes the dialect also need cross-references to get a completelist of foreign keys?booleanuseFollowOnLocking(String sql,QueryOptions queryOptions) Some dialects have trouble applying pessimistic locking dependingupon what other query options are specified (paging, ordering, etc).booleanShould LOBs (both BLOB and CLOB) be bound using stream operations,that is, usingPreparedStatement.setBinaryStream(int, InputStream, int)).booleanWhether to switch:fromVARCHAR-like types toSqlTypes.MATERIALIZED_CLOBtypes when the requested size for a type exceeds thegetMaxVarcharCapacity(),fromNVARCHAR-like types toSqlTypes.MATERIALIZED_NCLOBtypes when the requested size for a type exceeds thegetMaxNVarcharCapacity(), andfromVARBINARY-like types toSqlTypes.MATERIALIZED_BLOBtypes when the requested size for a type exceeds thegetMaxVarbinaryCapacity().
Field Details
QUOTE
Characters used as opening for quoting SQL identifiers- See Also:
CLOSED_QUOTE
Characters used as closing for quoting SQL identifiers- See Also:
LOG_BASE2OF10
protected static final double LOG_BASE2OF10TRUE_STRING_VALUES
FALSE_STRING_VALUES
LEGACY_LOB_MERGE_STRATEGY
ALobMergeStrategyrepresenting the legacy behavior of Hibernate.LOBs are not processed by merge.STREAM_XFER_LOB_MERGE_STRATEGY
ALobMergeStrategybased on transferring contents using streams.NEW_LOCATOR_LOB_MERGE_STRATEGY
ALobMergeStrategybased on creating a new LOB locator.STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY
Constructor Details
Dialect
Deprecated.provide aDatabaseVersionDialect
Dialect
Method Details
checkVersion
protected void checkVersion()determineDatabaseVersion
Determine the database version, as precise as possible and using Dialect-specific techniques,from aDialectResolutionInfoobject.- Parameters:
info- The dialect resolution info that would be passed by Hibernate ORMto the constructor of a Dialect of the same type.- Returns:
- The corresponding database version.
initDefaultProperties
protected void initDefaultProperties()Set appropriate default values for configuration properties.This default implementation sets"hibernate.jdbc.batch_size","hibernate.jdbc.lob.non_contextual_creation",and"hibernate.jdbc.use_get_generated_keys"to defaults determined by calling
getDefaultStatementBatchSize(),getDefaultNonContextualLobCreation(),andgetDefaultUseGetGeneratedKeys().An implementation may set additional configuration properties, butthis is discouraged.
registerColumnTypes
protected void registerColumnTypes(TypeContributions typeContributions,ServiceRegistry serviceRegistry) Register ANSI-standard column types using the length limits definedbygetMaxVarcharLength(),getMaxNVarcharLength(),andgetMaxVarbinaryLength().This method is always called when a
Dialectis instantiated.isLob
protected boolean isLob(int sqlTypeCode) columnType
The database column type name for a given JDBC type code definedinTypesorSqlTypes. This default implementationreturns the ANSI-standard type name.This method may be overridden by concrete
Dialects as analternative toregisterColumnTypes(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.LONG32VARBINARYarenot synonyms, and implementations of this method must define sensible mappings, for example to database-nativeTEXTorCLOBtypes.
- Implementations of this method are expected to define a sensible mapping for
stripsTrailingSpacesFromChar
public boolean stripsTrailingSpacesFromChar()Does this dialect strip trailing spaces from values storedin columns of typechar(n)?MySQL and Sybase are the main offenders here.castType
The SQL type to use incast( ... as ... )expressions whencasting to the target type represented by the given JDBC type code.- Parameters:
sqlTypeCode- The JDBC type code representing the target type- Returns:
- The SQL type to use in
cast()
registerDefaultKeywords
protected void registerDefaultKeywords()Register the reserved words of ANSI-standard SQL as keywords.- See Also:
registerKeywords
Register the reserved wordsreportedby the JDBC driver as keywords.- See Also:
getVersion
Get the version of the SQL dialect that is the target of this instance.getMinimumSupportedVersion
Get the version of the SQL dialect that is the minimum supported by this implementation.resolveSqlTypeCode
Resolves theSqlTypestype code for the given columntype name as reported by the database, ornullif it can't be resolved.resolveSqlTypeCode
protected Integer resolveSqlTypeCode(String typeName,String baseTypeName,TypeConfiguration typeConfiguration) Resolves theSqlTypestype code for the given columntype name as reported by the database and the base type name(i.e. without precision, length and scale), ornullif it can't be resolved.resolveSqlTypeDescriptor
public JdbcType resolveSqlTypeDescriptor(String columnTypeName, int jdbcTypeCode, int precision, int scale,JdbcTypeRegistry jdbcTypeRegistry) Assigns an appropriateJdbcTypeto a column of a JDBCresult set based on the column type name, JDBC type code,precision, and scale.resolveSqlTypeLength
public int resolveSqlTypeLength(String columnTypeName, int jdbcTypeCode, int precision, int scale, int displaySize) Determine the length/precision of a column based on information in theJDBCResultSetMetaData. Note that what JDBC reportsas a "precision"might actually be the column length.- 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- thedisplay size of the column- Returns:
- the precision or length of the column
getEnumTypeDeclaration
If this database has a special MySQL-styleenumcolumn type,return the type declaration for the given enumeration of values.If the database has no such type, return
null.- Parameters:
values- the enumerated values of the type- Returns:
- the DDL column type declaration
getEnumTypeDeclaration
getCreateEnumTypeCommand
getCreateEnumTypeCommand
getDropEnumTypeCommand
getDropEnumTypeCommand
getCheckCondition
Render a SQL check condition for a column that represents an enumerated valueby itsstring representationor a given list of values (with NULL value allowed).- Returns:
- a SQL expression that will occur in a
checkconstraint
getCheckCondition
getCheckCondition
Render a SQL check condition for a column that represents an enumerated value.by itsordinal representation.- Returns:
- a SQL expression that will occur in a
checkconstraint
getCheckCondition
@Deprecated(since="6.5",forRemoval=true)public String getCheckCondition(String columnName, long[] values) Deprecated, for removal: This API element is subject to removal in a future version.usegetCheckCondition(String, Long[])insteadRender a SQL check condition for a column that represents an enumerated valueby itsordinal representation.- Returns:
- a SQL expression that will occur in a
checkconstraint
getCheckCondition
Render a SQL check condition for a column that represents an enumerated valueby itsordinal representationor a given list of values.- Returns:
- a SQL expression that will occur in a
checkconstraint
getCheckCondition
Generate a SQLcheckcondition for the given column,constraining to the given values.- Returns:
- a SQL expression that will occur in a
checkconstraint - Since:
- 7.0
- API Note:
- Only supports
TINYINT,SMALLINT,CHAR, andVARCHAR
contributeFunctions
Description copied from interface:FunctionContributorContribute functions- Specified by:
contributeFunctionsin interfaceFunctionContributor- Parameters:
functionContributions- The target for the contributions
ordinal
public int ordinal()Description copied from interface:FunctionContributorDetermines order in which the contributions will be applied(lowest ordinal first).The range 0-500 is reserved for Hibernate, range 500-1000 for libraries and1000-Integer.MAX_VALUE for user-defined FunctionContributors.
Contributions from higher precedence contributors (higher numbers) effectively overridecontributions from lower precedence. E.g. if a contributor with precedence 1000 contributes afunction named
"max", that will override Hibernate's standard function of that name.- Specified by:
ordinalin interfaceFunctionContributor- Returns:
- the ordinal for this FunctionContributor
initializeFunctionRegistry
Initialize the given registry with any dialect-specific functions.Support for certain SQL functions is required, and if the databasedoes not support a required function, then the dialect must definea way to emulate it.
These required functions include the functions defined by the JPAquery language specification:
avg(arg)- aggregate functioncount([distinct ]arg)- aggregate functionmax(arg)- aggregate functionmin(arg)- aggregate functionsum(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 datecurrent timecurrent timestamp
any(arg)- aggregate functionevery(arg)- aggregate function
var_samp(arg)- aggregate functionvar_pop(arg)- aggregate functionstddev_samp(arg)- aggregate functionstddev_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 datelocal timelocal datetimeoffset datetimeinstant
left(string, length)right(string, length)replace(string, pattern, replacement)pad(string with length spec[ character])repeat(string, times)
pilog10(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 integertype returned by the native function with this name on many databases.Thus, we don't just naively map these HQL functions to the native SQLfunctions with the same names.currentDate
currentTime
Translation of the HQL/JPQLcurrent_timefunction, whichmaps to the Java typeTimewhich is a time withno time zone. This contradicts ANSI SQL wherecurrent_timehas the typeTIME WITH TIME ZONE.It is recommended to override this in dialects for databases whichsupport
localtimeortime at local.currentTimestamp
Translation of the HQL/JPQLcurrent_timestampfunction,which maps to the Java typeTimestampwhich isa 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 whichsupport
localtimestamportimestamp at local.currentLocalTime
Translation of the HQLlocal_timefunction, which maps tothe Java typeLocalTimewhich is a time with notime zone. It should usually be the same SQL function as forcurrentTime().It is recommended to override this in dialects for databases whichsupport
localtimeorcurrent_time at local.currentLocalTimestamp
Translation of the HQLlocal_datetimefunction, which mapsto the Java typeLocalDateTimewhich is a datetimewith no time zone. It should usually be the same SQL function as forcurrentTimestamp().It is recommended to override this in dialects for databases whichsupport
localtimestamporcurrent_timestamp at local.currentTimestampWithTimeZone
Translation of the HQLoffset_datetimefunction, which mapsto the Java typeOffsetDateTimewhich is a datetimewith a time zone. This in principle correctly maps to the ANSI SQLcurrent_timestampwhich has the typeTIMESTAMP WITH TIME ZONE.extractPattern
Obtain a pattern for the SQL equivalent to anextract()function call. The resultingpattern must contain ?1 and ?2 placeholdersfor 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.- Parameters:
unit- the first argument
castPattern
Obtain a pattern for the SQL equivalent to acast()function call. The resultingpattern must contain ?1 and ?2 placeholdersfor the arguments.buildStringToBooleanCast
buildStringToBooleanCastDecode
buildStringToBooleanDecode
getDual
Returns a table expression that has one row.- Returns:
- the SQL equivalent to Oracle's
dual.
getFromDualForSelectOnly
trimPattern
Obtain a pattern for the SQL equivalent to atrim()function call. The resultingpattern must contain a ?1 placeholder for theargument of typeStringand a ?2 placeholderfor the trim character ifisWhitespacewas false.supportsFractionalTimestampArithmetic
public boolean supportsFractionalTimestampArithmetic()Whether the database supports adding a fractional intervalto a timestamp, for exampletimestamp + 0.5 second.timestampdiffPattern
public String timestampdiffPattern(TemporalUnit unit,TemporalType fromTemporalType,TemporalType toTemporalType) Obtain a pattern for the SQL equivalent to atimestampdiff()function call. The resultingpattern must contain ?1, ?2, and ?3 placeholdersfor the arguments.- Parameters:
unit- the first argumentfromTemporalType- true if the first argument is a timestamp, false if a datetoTemporalType- true if the second argument is
timestampaddPattern
public String timestampaddPattern(TemporalUnit unit,TemporalType temporalType,IntervalType intervalType) Obtain a pattern for the SQL equivalent to atimestampadd()function call. The resultingpattern must contain ?1, ?2, and ?3 placeholdersfor the arguments.- 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
equivalentTypes
public boolean equivalentTypes(int typeCode1, int typeCode2) Do the given JDBC type codes, as defined inTypesrepresentessentially the same type in this dialect of SQL?The default implementation treats
NUMERICandDECIMALas the same type, andFLOAT,REAL, andDOUBLEas essentially the same type, since theANSI SQL specification fails to meaningfully distinguish them.The default implementation also treats
VARCHAR,NVARCHAR,LONGVARCHAR,andLONGNVARCHARas the same type, andBINARYandLONGVARBINARYas the same type, sinceHibernate doesn't really differentiate these types.On the other hand, integral types are not treated as equivalent,instead,
isCompatibleIntegralType(int, int)is responsiblefor determining if the types are compatible.- Parameters:
typeCode1- the first column type infotypeCode2- the second column type info- Returns:
trueif the two type codes are equivalent
getDefaultProperties
Retrieve a set of default Hibernate properties for this database.An implementation may set configuration properties from
initDefaultProperties(), though it is discouraged.- Returns:
- the Hibernate configuration properties
- See Also:
getDefaultStatementBatchSize
public int getDefaultStatementBatchSize()The default value to use for the configuration property"hibernate.jdbc.batch_size".getDefaultNonContextualLobCreation
public boolean getDefaultNonContextualLobCreation()The default value to use for the configuration property"hibernate.jdbc.lob.non_contextual_creation".getDefaultUseGetGeneratedKeys
public boolean getDefaultUseGetGeneratedKeys()The default value to use for the configuration property"hibernate.jdbc.use_get_generated_keys".toString
contribute
Description copied from interface:TypeContributorContribute types- Specified by:
contributein interfaceTypeContributor- Parameters:
typeContributions- The callback for adding contributed typesserviceRegistry- The service registry
contributeTypes
A callback which allows theDialectto contribute types.- Parameters:
typeContributions- Callback to contribute the typesserviceRegistry- The service registry
getLobMergeStrategy
Get theLobMergeStrategyto use,NEW_LOCATOR_LOB_MERGE_STRATEGYby default.getNativeIdentifierGeneratorStrategy
Deprecated, for removal: This API element is subject to removal in a future version.UsegetNativeValueGenerationStrategy() insteadThe name identifying the "native" id generation strategy for this dialect.This is the name of the id generation strategy which should be used when
"native"is specified inhbm.xml.- Returns:
- The name identifying the native generator strategy.
- Implementation Note:
- Only used with
hbm.xmlandGenericGenerator,both of which have been deprecated
getNativeValueGenerationStrategy
The native type of generation supported by this Dialect.- Since:
- 7.0
- See Also:
getIdentityColumnSupport
Get the appropriateIdentityColumnSupportfor this dialect.- Returns:
- the IdentityColumnSupport
- Since:
- 5.1
getSequenceSupport
Get the appropriateSequenceSupportfor this dialect.getQuerySequencesString
Get theselectcommand used retrieve the names of all sequences.- Returns:
- The select command; or null if sequences are not supported.
getSequenceInformationExtractor
ASequenceInformationExtractorwhich is able to extractSequenceInformationfrom the JDBC result set returned whengetQuerySequencesString()is executed.getInformationExtractor
AInformationExtractorwhich is able to extracttable, primary key, foreign key, index information etc. via JDBC.- Since:
- 7.2
getSelectGUIDString
Get the command used to select a GUID from the database.Optional operation.
- Returns:
- The appropriate command.
supportsTemporaryTables
Deprecated, for removal: This API element is subject to removal in a future version.UsegetLocalTemporaryTableStrategy()andgetGlobalTemporaryTableStrategy()to check insteadDoes this database have some sort of support for temporary tables?- Returns:
- true by default, since most do
supportsTemporaryTablePrimaryKey
Deprecated, for removal: This API element is subject to removal in a future version.Does this database support primary keys for temporary tables?- Returns:
- true by default, since most do
getLimitHandler
Obtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).getLockingSupport
Access to various details and operations related to thisDialect's support for pessimistic locking.supportsForUpdate
Deprecated.See notes onLockingSupport.Metadata.supportsForUpdate()Whether this dialect supportsfor update (of)supportsSkipLocked
Deprecated.See notes onLockingSupport.Metadata.supportsSkipLocked()Does this dialect supportSKIP_LOCKEDtimeout.- Returns:
trueif SKIP_LOCKED is supported
supportsNoWait
Deprecated.See notes onLockingSupport.Metadata.supportsNoWait()Does this dialect supportNO_WAITtimeout.- Returns:
trueifNO_WAITis supported
supportsWait
Deprecated.See notes onLockingSupport.Metadata.supportsWait()Does this dialect supportWAITtimeout.- Returns:
trueifWAITis supported
useFollowOnLocking
Some dialects have trouble applying pessimistic locking dependingupon what other query options are specified (paging, ordering, etc).This method allows these dialects to request that locking be appliedby subsequent selects.- Returns:
trueindicates that the dialect requests that locking be applied by subsequent select;false(the default) indicates that locking should be applied to the main SQL statement.- Since:
- 6.0
getPessimisticLockStyle
Deprecated.UseLockingSupport.Metadata.getPessimisticLockStyle() instead.Here, fwiw, we use1-second to make the determination.getWriteRowLockStrategy
Deprecated.UseLockingSupport.Metadata.getWriteRowLockStrategy(),viagetLockingSupport(), instead.Thestrategy for indicating which rowsto lock as part of afor update ofstyle clause.getReadRowLockStrategy
Deprecated.UseLockingSupport.Metadata.getReadRowLockStrategy(),viagetLockingSupport(), instead.Thestrategy for indicating which rowsto lock as part of afor share ofstyle clause.getLockingClauseStrategy
Strategy for handlinglocking clauseas part ofSqlAstTranslator.buildLockingClauseStrategy
protected LockingClauseStrategy buildLockingClauseStrategy(org.hibernate.sql.ast.internal.PessimisticLockKind lockKind,RowLockStrategy rowLockStrategy,LockOptions lockOptions,Set<NavigablePath> rootPathsForLocking) getLockingStrategy
public LockingStrategy getLockingStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) ALockingStrategywhich is able to acquire a database-levellock with the specifiedlevel.- Parameters:
lockable- The persister for the entity to be locked.lockMode- The type of lock to be acquired.- Returns:
- The appropriate locking strategy.
- Since:
- 7
getLockingStrategy
@Deprecated(since="7",forRemoval=true)public LockingStrategy getLockingStrategy(EntityPersister lockable,LockMode lockMode) Deprecated, for removal: This API element is subject to removal in a future version.ALockingStrategywhich is able to acquire a database-levellock with the specifiedlevel.- Parameters:
lockable- The persister for the entity to be locked.lockMode- The type of lock to be acquired.- Returns:
- The appropriate locking strategy.
- Since:
- 3.2
buildPessimisticForceIncrementStrategy
protected LockingStrategy buildPessimisticForceIncrementStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) buildPessimisticWriteStrategy
protected LockingStrategy buildPessimisticWriteStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) buildPessimisticReadStrategy
protected LockingStrategy buildPessimisticReadStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) buildOptimisticForceIncrementStrategy
protected LockingStrategy buildOptimisticForceIncrementStrategy(EntityPersister lockable,LockMode lockMode) buildOptimisticStrategy
buildReadStrategy
protected LockingStrategy buildReadStrategy(EntityPersister lockable,LockMode lockMode,Locking.Scope lockScope) getForUpdateString
Given a set ofLockOptions(lock level, timeout),determine the appropriatefor updatefragment touse to obtain the lock.- Parameters:
lockOptions- contains the lock mode to apply.- Returns:
- The appropriate
for updatefragment.
getForUpdateString
Given alock level and timeout,determine the appropriatefor updatefragment touse to obtain the lock.- Parameters:
lockMode- the lock mode to apply.timeout- the timeout- Returns:
- The appropriate
for updatefragment.
getForUpdateString
Deprecated.UsegetForUpdateString(LockMode,Timeout) insteadGiven alock level and timeout,determine the appropriatefor updatefragment touse to obtain the lock.- Parameters:
lockMode- the lock mode to apply.timeout- the timeout- Returns:
- The appropriate
for updatefragment.
getForUpdateString
getForUpdateString
Get the string to append toSELECTstatements toacquire pessimistic UPGRADE locks for this dialect.- Returns:
- The appropriate
FOR UPDATEclause string.
getWriteLockString
getWriteLockString
Deprecated.UsegetWriteLockString(Timeout) instead.Get the string to append toSELECTstatements toacquire pessimistic WRITE locks for this dialect.Location of the returned string is treated the same as
getForUpdateString().- Parameters:
timeout- How long, in milliseconds, the database should wait to acquire the lock. SeeTimeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
getWriteLockString
Get the string to append toSELECTstatements toacquire WRITE locks for this dialect, given the aliases ofthe columns to be WRITE locked. * * @param timeout How long the database should wait to acquire the lock.Location of the returned string is treated the same as
getForUpdateString().- Parameters:
aliases- The columns to be read locked.timeout- How long the database should wait to acquire the lock. SeeTimeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
getWriteLockString
Deprecated.UsegetWriteLockString(String, Timeout) instead.Get the string to append toSELECTstatements toacquire WRITE locks for this dialect, given the aliases ofthe columns to be WRITE locked.Location of the returned string is treated the same as
getForUpdateString().- Parameters:
aliases- The columns to be read locked.timeout- How long, in milliseconds, the database should wait to acquire the lock. SeeTimeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
getReadLockString
getReadLockString
Deprecated.UsegetReadLockString(Timeout) instead.Get the string to append toSELECTstatements toacquire READ locks for this dialect.Location of the returned string is treated the same as
getForUpdateString().- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate
LOCKclause string.
getReadLockString
Get the string to append toSELECTstatements toacquire READ locks for this dialect, given the aliases ofthe columns to be read locked.- Parameters:
aliases- The columns to be read locked.timeout- How long the database should wait to acquire the lock. SeeTimeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string. - Implementation Note:
- By default, simply returns thegetReadLockString(Timeout)result since the default is to say no support for "FOR UPDATE OF ...".
getReadLockString
Deprecated.UsegetReadLockString(String, Timeout) instead.Get the string to append toSELECTstatements toacquire READ locks for this dialect, given the aliases ofthe columns to be read locked.Location of the returned string is treated the same as
getForUpdateString().- Parameters:
aliases- The columns to be read locked.timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate
LOCKclause string.
getForUpdateString
getForUpdateString
Get theFOR UPDATE OForFOR SHARE OFfragmentappropriate for this dialect, given the aliases of the columnsto be locked.- Parameters:
aliases- The columns to be locked.lockOptions- the lock options to apply- Returns:
- The appropriate
FOR UPDATE OF column_listclause string.
getForUpdateNowaitString
Retrieves theFOR UPDATE NOWAITsyntax specific to this dialect.- Returns:
- The appropriate
FOR UPDATE NOWAITclause string.
getForUpdateSkipLockedString
Retrieves theFOR UPDATE SKIP LOCKEDsyntax specific to this dialect.- Returns:
- The appropriate
FOR UPDATE SKIP LOCKEDclause string.
getForUpdateString
getForUpdateNowaitString
Get theFOR UPDATE OF column_list NOWAITfragment appropriatefor this dialect, given the aliases of the columns to be write locked.- Parameters:
aliases- The columns to be write locked.- Returns:
- The appropriate
FOR UPDATE OF colunm_list NOWAITclause string.
getForUpdateSkipLockedString
Get theFOR UPDATE OF column_list SKIP LOCKEDfragment appropriatefor this dialect, given the aliases of the columns to be write locked.- Parameters:
aliases- The columns to be write locked.- Returns:
- The appropriate
FOR UPDATE colunm_list SKIP LOCKEDclause string.
appendLockHint
Some dialects support an alternative means toSELECT FOR UPDATE,whereby a "lock hint" is appended to the table name in thefromclause.- Parameters:
lockOptions- The lock options to applytableName- The name of the table to which to apply the lock hint.- Returns:
- The table with any required lock hints.
applyLocksToSql
public String applyLocksToSql(String sql,LockOptions aliasedLockOptions,Map<String, String[]> keyColumnNames) Modifies the given SQL, applying the appropriate updates for the specifiedlock modes and key columns.This allows emulation of
SELECT FOR UPDATEfor dialects which do notsupport the standard syntax.- Parameters:
sql- the SQL string to modifyaliasedLockOptions- lock options indexed by aliased table names.keyColumnNames- a map of key columns indexed by aliased table names.- Returns:
- the modified SQL string.
supportsOuterJoinForUpdate
Deprecated.Does this dialect supportFOR UPDATEin conjunction withouter-joined rows?- Returns:
- True if outer-joined rows can be locked via
FOR UPDATE.
supportsLockTimeouts
Deprecated.UseLockingSupport.Metadata.getPessimisticLockStyle(),viagetLockingSupport(), instead.Whether this dialect supports specifying timeouts when requesting locks.- Returns:
- True if this dialect supports specifying lock timeouts.
- API Note:
- Specifically, we are interested here in whether the Dialect supportsrequesting a lock timeout as part of the SQL query.
getTimeoutInSeconds
Deprecated.UseTimeouts.getTimeoutInSeconds(int) instead.getCreateTableString
The command used to create a table, usuallycreate table.- Returns:
- The command used to create a table.
getTableTypeString
An arbitrary fragment appended to the end of thecreate tablestatement.- API Note:
- An example is the MySQL
engineoption specifying a storage engine.
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()For dropping a table, can the phraseif existsbeapplied before the table name?- Returns:
trueifif existscan be applied before the table name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsAfterTableName()should return true.
supportsIfExistsAfterTableName
public boolean supportsIfExistsAfterTableName()For dropping a table, can the phraseif existsbeapplied after the table name?- Returns:
trueifif existscan be applied after the table name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsBeforeTableName()should return true.
getBeforeDropStatement
A command to execute before dropping tables.- Returns:
- A SQL statement, or
null
getDropTableString
Deprecated.No longer usedThe command used to drop a table with the given name, usuallydrop table tab_name.- Parameters:
tableName- The name of the table to drop- Returns:
- The
drop tablestatement as a string - See Also:
StandardTableExporter.getSqlDropStrings(Table, Metadata, SqlStringGenerationContext)
getCreateIndexString
The command used to create an index, usuallycreate indexorcreate unique index.- Parameters:
unique-trueif the index is a unique index- Returns:
- The command used to create an index.
getCreateIndexTail
qualifyIndexName
public boolean qualifyIndexName()Do we need to qualify index names with the schema name?- Returns:
trueif we do
getCreateMultisetTableString
Slight variation ongetCreateTableString(). Here, we havethe command used to create a table when there is no primary keyand duplicate rows are expected.- Returns:
- The command used to create a multiset table.
- API Note:
- Most databases do not have this distinction; this method was originally added for Teradata which does.
hasAlterTable
public boolean hasAlterTable()Does this dialect support theALTER TABLEsyntax?- Returns:
- True if we support altering existing tables; false otherwise.
getAlterTableString
The command used to alter a table with the given name, usuallyalter table tab_nameoralter table tab_name if exists.We prefer the
if existsform if supported.- Parameters:
tableName- The name of the table to alter- Returns:
- The command used to alter a table.
- Since:
- 5.2.11
supportsIfExistsAfterAlterTable
public boolean supportsIfExistsAfterAlterTable()For analter table, can the phraseif existsbeapplied?- Returns:
trueifif existscan be applied afteralter table- Since:
- 5.2.11
getAddColumnString
The subcommand of thealter tablecommand used to adda column to a table, usuallyadd columnoradd.- Returns:
- The
add columnfragment.
getAddColumnSuffixString
The syntax for the suffix used to add a column to a table.- Returns:
- The suffix of the
add columnfragment.
dropConstraints
public boolean dropConstraints()Do we need to drop constraints before dropping tables in this dialect?- Returns:
- True if constraints must be dropped prior to dropping the table; false otherwise.
getDropForeignKeyString
The subcommand of thealter tablecommand used to dropa foreign key constraint, usuallydrop constraint.getDropUniqueKeyString
The subcommand of thealter tablecommand used to dropa unique key constraint.supportsIfExistsBeforeConstraintName
public boolean supportsIfExistsBeforeConstraintName()For dropping a constraint with analter tablestatement,can the phraseif existsbe applied before the constraintname?- Returns:
trueifif existscan be applied before the constraint name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsAfterConstraintName()should return true
supportsIfExistsAfterConstraintName
public boolean supportsIfExistsAfterConstraintName()For dropping a constraint with analter table, can thephraseif existsbe applied after the constraint name?- Returns:
trueifif existscan be applied after the constraint name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsBeforeConstraintName()should return true.
supportsAlterColumnType
public boolean supportsAlterColumnType()Does this dialect support modifying the type of an existing column?getAlterColumnTypeString
The fragment of analter tablecommand which modifies acolumn type, or null if column types cannot be modified.Oftenalter column col_name set data type col_type.- 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
getAddForeignKeyConstraintString
public String getAddForeignKeyConstraintString(String constraintName,String[] foreignKey,String referencedTable,String[] primaryKey, boolean referencesPrimaryKey) The syntax used to add a foreign key constraint to a table,with the referenced key columns explicitly specified.- Parameters:
constraintName- The foreign key constraint nameforeignKey- The names of the columns comprising the foreign keyreferencedTable- The table referenced by the foreign keyprimaryKey- The explicit columns in the referencedTable referenced by this foreign key.referencesPrimaryKey- if false, constraint should be explicit about which column names the constraint refers to- Returns:
- the "add FK" fragment
getAddForeignKeyConstraintString
The syntax used to add a foreign key constraint to a table,given the definition of the foreign key as a string.- Parameters:
constraintName- The foreign key constraint nameforeignKeyDefinition- The whole definition of the foreign key as a fragment
useCrossReferenceForeignKeys
public boolean useCrossReferenceForeignKeys()Does the dialect also need cross-references to get a completelist of foreign keys?getCrossReferenceParentTableFilter
Some dialects require a not null primaryTable filter.Sometimes a wildcard entry is sufficient for the like condition.getAddPrimaryKeyConstraintString
requiresColumnListInCreateView
public boolean requiresColumnListInCreateView()Is a list of column names required in thecreate viewstatement?- Since:
- 7.1
getFallbackSqmMutationStrategy
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType entityDescriptor,RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().getFallbackSqmInsertStrategy
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType entityDescriptor,RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().getCreateUserDefinedTypeKindString
The kind of user-defined type to create, or the emptystring if this does not need to be specified. Includedaftercreate type type_name as, but before thelist of members.getCreateUserDefinedTypeExtensionsString
An arbitrary extension to append to the end of the UDTcreate typecommand.supportsIfExistsBeforeTypeName
public boolean supportsIfExistsBeforeTypeName()For dropping a type, can the phraseif existsbeapplied before the type name?- Returns:
trueifif existscan be applied before the type name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsAfterTypeName()should return true.
supportsIfExistsAfterTypeName
public boolean supportsIfExistsAfterTypeName()For dropping a type, can the phraseif existsbeapplied after the type name?- Returns:
trueifif existscan be applied after the type name- API Note:
- Only one or the other (or neither) of this and
supportsIfExistsBeforeTypeName()should return true.
getCatalogSeparator
registerResultSetOutParameter
public int registerResultSetOutParameter(CallableStatement statement, int position) throwsSQLException Registers a parameter capable of returning aResultSetby position, either anOUTparameter, or aREF_CURSORparameter as defined in Java 8.- Parameters:
statement- The callable statement.position- The bind position at which to register the output param.- Returns:
- The number of (contiguous) bind positions used.
- Throws:
SQLException- Indicates problems registering the param.- API Note:
- Before Java 8, support for
ResultSet-returning parameters was very uneven across database and drivers, leading to its inclusion as part of theDialectcontract.
registerResultSetOutParameter
public int registerResultSetOutParameter(CallableStatement statement,String name) throwsSQLException Registers a parameter capable of returning aResultSetby name, either anOUTparameter, or aREF_CURSORparameter as defined in Java 8.- Parameters:
statement- The callable statement.name- The parameter name (for drivers which support named parameters).- Returns:
- The number of (contiguous) bind positions used.
- Throws:
SQLException- Indicates problems registering the param.- API Note:
- Before Java 8, support for
ResultSet-returning parameters was very uneven across database and drivers, leading to its inclusion as part of theDialectcontract.
getResultSet
Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom theOUTparameter.- Parameters:
statement- The callable statement.- Returns:
- The extracted result set.
- Throws:
SQLException- Indicates problems extracting the result set.
getResultSet
Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom the positionalOUTparameter.- Parameters:
statement- The callable statement.position- The bind position at which to register the output param.- Returns:
- The extracted result set.
- Throws:
SQLException- Indicates problems extracting the result set.
getResultSet
Given acallable statement previouslyprocessed byregisterResultSetOutParameter(CallableStatement, int), extract theResultSetfrom the namedOUTparameter.- Parameters:
statement- The callable statement.name- The parameter name (for drivers which support named parameters).- Returns:
- The extracted result set.
- Throws:
SQLException- Indicates problems extracting the result set.
supportsCurrentTimestampSelection
public boolean supportsCurrentTimestampSelection()Does this dialect support some way to retrieve the current timestampvalue from the database?- Returns:
- True if the current timestamp can be retrieved; false otherwise.
isCurrentTimestampSelectStringCallable
public boolean isCurrentTimestampSelectStringCallable()Is the command returned bygetCurrentTimestampSelectString()treated as callable?Typically, this indicates the use of the JDBC escape syntax.
- Returns:
- if the
getCurrentTimestampSelectString()is treated as callable; false otherwise.
getCurrentTimestampSelectString
The command used to retrieve the current timestamp from the database.supportsStandardCurrentTimestampFunction
public boolean supportsStandardCurrentTimestampFunction()Does this dialect have an ANSI SQLcurrent_timestampfunction?buildSQLExceptionConversionDelegate
An instance ofSQLExceptionConversionDelegatefor interpretingdialect-specificerror orSQLState codes.If this method is overridden to return a non-null value, the default
SQLExceptionConverterwill use the returnedSQLExceptionConversionDelegatein addition to the followingstandard 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 isreported by the JDBC driver.
It is strongly recommended that every
Dialectimplementationoverride this method, since interpretation of a SQL error is muchmore accurate when based on the vendor-specificerror code, rather than onthe SQLState.- Returns:
- The
SQLExceptionConversionDelegatefor this dialect
- a "static" delegate based on the JDBC4-defined
getViolatedConstraintNameExtractor
AViolatedConstraintNameExtractorfor extracting the name ofa violated constraint from aSQLException.- Specified by:
getViolatedConstraintNameExtractorin interfaceConversionContext
getSelectClauseNullString
@Deprecated(forRemoval=true)public String getSelectClauseNullString(int sqlType,TypeConfiguration typeConfiguration) Deprecated, for removal: This API element is subject to removal in a future version.Given aJDBC type code, return the expressionfor a literal null value of that type, to use in aselectclause.The
selectquery will be an element of aUNIONorUNION ALL.- Parameters:
sqlType- TheTypestype code.typeConfiguration- The type configuration- Returns:
- The appropriate select clause value fragment.
- Implementation Note:
- Some databases require an explicit type cast.
getSelectClauseNullString
public String getSelectClauseNullString(SqlTypedMapping sqlTypeMapping,TypeConfiguration typeConfiguration) Given a type mapping, return the expressionfor a literal null value of that type, to use in aselectclause.The
selectquery will be an element of aUNIONorUNION ALL.- Parameters:
sqlTypeMapping- The type mapping.typeConfiguration- The type configuration- Returns:
- The appropriate select clause value fragment.
- Implementation Note:
- Some databases require an explicit type cast.
supportsUnionAll
public boolean supportsUnionAll()Does this dialect supportUNION ALL?- Returns:
- True if
UNION ALLis supported; false otherwise.
supportsUnionInSubquery
public boolean supportsUnionInSubquery()Does this dialect supportUNIONin a subquery.- Returns:
- True if
UNIONis supported in a subquery; false otherwise.
getNoColumnsInsertString
Deprecated.Override the methodrenderInsertIntoNoColumns()on thetranslatorreturned by this dialect.The fragment used to insert a row without specifying any column values,usually just(), but sometimesdefault values.- Returns:
- The appropriate empty values clause.
- Implementation Note:
- On the other hand, this is simply not possible on some databases!
supportsNoColumnsInsert
public boolean supportsNoColumnsInsert()Is theINSERTstatement is allowed to contain no columns?- Returns:
- if this dialect supports no-column
INSERT.
getLowercaseFunction
The name of the SQL function that transforms a string to lowercase,almost alwayslower.- Returns:
- The dialect-specific lowercase function.
getCaseInsensitiveLike
The name of the SQL operator that performs case-insensitiveLIKEcomparisons.- Returns:
- The dialect-specific case-insensitive like operator.
supportsCaseInsensitiveLike
public boolean supportsCaseInsensitiveLike()Does this dialect support case-insensitiveLIKEcomparisons?- Returns:
trueif the database supports case-insensitive like comparisons,falseotherwise. The default isfalse.
supportsTruncateWithCast
public boolean supportsTruncateWithCast()Does this dialect support truncation of values to a specified lengthvia acast?- Returns:
trueif the database supports truncation via a cast,falseotherwise. The default istrue.
supportsIsTrue
public boolean supportsIsTrue()Does this dialect support theis trueandis falseoperators?- Returns:
trueif the database supportsis trueandis false, orfalseif it does not. The default isis false.
transformSelectString
getMaxAliasLength
public int getMaxAliasLength()What is the maximum length Hibernate can use for generated aliases?- Returns:
- The maximum length.
- Implementation Note:
- The maximum here should account for the fact that Hibernate often needsto append "uniqueing" information to the end of generated aliases.That "uniqueing" information will be added to the end of an identifiergenerated to the length specified here; so be sure to leave some room(generally speaking 5 positions will suffice).
getMaxIdentifierLength
public int getMaxIdentifierLength()What is the maximum identifier length supported by this dialect?- Returns:
- The maximum length.
toBooleanValueString
The SQL literal expression representing the given boolean value.- Parameters:
bool- The boolean value- Returns:
- The appropriate SQL literal.
appendBooleanValueString
Append the SQL literal expression representing the given booleanvalue to the givenSqlAppender.- Parameters:
appender- TheSqlAppenderto append the literal expression tobool- The boolean value
registerKeyword
Register a keyword.- Parameters:
word- a reserved word in this SQL dialect
getKeywords
buildIdentifierHelper
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, @NullableDatabaseMetaData metadata) throwsSQLException TheIdentifierHelperindicated by this dialect for handling identifier conversions.Returningnullis allowed and indicates that Hibernate should fall back to buildinga "standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilderduring 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
sqlKeywordscollected here as reserved words - Applies the Dialect's
NameQualifierSupport, if it defines one
- 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:
openQuote
public char openQuote()The character specific to this dialect used to begin a quoted identifier.- Returns:
- The dialect-specific open quote character.
closeQuote
public char closeQuote()The character specific to this dialect used to close a quoted identifier.- Returns:
- The dialect-specific close quote character.
toQuotedIdentifier
Apply dialect-specific quoting.- Parameters:
name- The value to be quoted.- Returns:
- The quoted value.
- See Also:
quote
Apply dialect-specific quoting if the given name is quoted using backticks.By default, the incoming name is checked to see if its first character isa backtick (
`). If it is, the dialect specific quoting is applied.- Parameters:
name- The value to be quoted.- Returns:
- The quoted (or unmodified, if not starting with backtick) value.
- See Also:
getFallbackSchemaManagementTool
@Incubatingpublic SchemaManagementTool getFallbackSchemaManagementTool(Map<String, Object> configurationValues,ServiceRegistryImplementor registry) TheSchemaManagementToolto use if none is explicitly specified.- Returns:
- a
HibernateSchemaManagementToolby default - API Note:
- Allows implementations to override how schema tooling works by default
getTableExporter
getTableMigrator
Get aTableMigrator,usuallyStandardTableMigrator.getTableCleaner
getUserDefinedTypeExporter
getSequenceExporter
getIndexExporter
getForeignKeyExporter
getUniqueKeyExporter
getAuxiliaryDatabaseObjectExporter
getTemporaryTableExporter
Get aTemporaryTableExporter,usuallyStandardTemporaryTableExporter.getPersistentTemporaryTableStrategy
The strategy to use for persistent temporary tables.- Since:
- 7.1
getLocalTemporaryTableStrategy
The strategy to use for local temporary tables.- Since:
- 7.1
getGlobalTemporaryTableStrategy
The strategy to use for global temporary tables.- Since:
- 7.1
getSupportedTemporaryTableKind
Deprecated, for removal: This API element is subject to removal in a future version.The kind of temporary tables that are supported on this database.getTemporaryTableCreateOptions
Deprecated, for removal: This API element is subject to removal in a future version.An arbitrary SQL fragment appended to the end of the statement tocreate a temporary table, specifying dialect-specific options, ornullif there are no options to specify.getTemporaryTableCreateCommand
Deprecated, for removal: This API element is subject to removal in a future version.The command to create a temporary table.getTemporaryTableDropCommand
Deprecated, for removal: This API element is subject to removal in a future version.The command to drop a temporary table.getTemporaryTableTruncateCommand
Deprecated, for removal: This API element is subject to removal in a future version.The command to truncate a temporary table.getCreateTemporaryTableColumnAnnotation
@Deprecated(forRemoval=true,since="7.1")public String getCreateTemporaryTableColumnAnnotation(int sqlTypeCode) Deprecated, for removal: This API element is subject to removal in a future version.Annotation to be appended to the end of each COLUMN clause for temporary tables.- Parameters:
sqlTypeCode- The SQL type code- Returns:
- The annotation to be appended, for example,
COLLATE DATABASE_DEFAULTin SQL Server
getTemporaryTableDdlTransactionHandling
@Deprecated(since="7.0")public TempTableDdlTransactionHandling getTemporaryTableDdlTransactionHandling()Deprecated.No dialect currently overrides this, so it's obsoleteThe sort oftransaction handlingto use when creating or dropping temporary tables.getTemporaryTableAfterUseAction
Deprecated, for removal: This API element is subject to removal in a future version.The action to take after finishing use of a temporary table.getTemporaryTableBeforeUseAction
Deprecated, for removal: This API element is subject to removal in a future version.The action to take before beginning use of a temporary table.canCreateCatalog
public boolean canCreateCatalog()Does this dialect support creating and dropping catalogs?- Returns:
- True if the dialect supports catalog creation; false otherwise.
getCreateCatalogCommand
getDropCatalogCommand
canCreateSchema
public boolean canCreateSchema()Does this dialect support creating and dropping schema?- Returns:
- True if the dialect supports schema creation; false otherwise.
getCreateSchemaCommand
getDropSchemaCommand
getCurrentSchemaCommand
Deprecated.Since Hibernate now baselines on Java 17,Connection.getSchema()is always available directly.Never used internally.Get the SQL command used to retrieve the current schema name.Works in conjunction with
getSchemaNameResolver(),unless the resultingSchemaNameResolverdoes not needthis information. For example, a custom implementation mightmake use of the Java 1.7Connection.getSchema()method.- Returns:
- The current schema retrieval SQL
getSchemaNameResolver
Get the strategy for determining the schema name from a JDBCConnection, usuallyDefaultSchemaNameResolver.- Returns:
- The schema name resolver strategy
hasSelfReferentialForeignKeyBug
public boolean hasSelfReferentialForeignKeyBug()Does the database/driver have bug in deleting rows that refer toother rows being deleted in the same query?- Returns:
trueif the database/driver has this bug- Implementation Note:
- The main culprit is MySQL.
getNullColumnString
The keyword used to specify a nullable column, usually"",but sometimes" null".getNullColumnString
quoteCollation
supportsCommentOn
public boolean supportsCommentOn()Does this dialect support commenting on tables and columns?- Returns:
trueif commenting is supported
getTableComment
getUserDefinedTypeComment
getColumnComment
supportsColumnCheck
public boolean supportsColumnCheck()Does this dialect support column-level check constraints?- Returns:
- True if column-level
checkconstraints are supported; false otherwise.
supportsNamedColumnCheck
public boolean supportsNamedColumnCheck()Does this dialect support named column-level check constraints?- Returns:
- True if named column-level
checkconstraints are supported; false otherwise.
supportsTableCheck
public boolean supportsTableCheck()Does this dialect support table-level check constraints?- Returns:
- True if table-level
checkconstraints are supported; false otherwise.
supportsCascadeDelete
public boolean supportsCascadeDelete()Does this dialect supporton deleteactions in foreign key definitions?- Returns:
trueif the dialect does support theon deleteclause.
getCascadeConstraintsString
The keyword that specifies that adrop tableoperationshould be cascaded to its constraints, typically" cascade"where the leading space is required, orthe empty string if there is no such keyword in this dialect.- Returns:
- The cascade drop keyword, if any, with a leading space
getColumnAliasExtractor
AColumnAliasExtractor, usually justResultSetMetaData.getColumnLabel(int).useInputStreamToInsertBlob
public boolean useInputStreamToInsertBlob()Should LOBs (both BLOB and CLOB) be bound using stream operations,that is, usingPreparedStatement.setBinaryStream(int, InputStream, int)).- Returns:
- True if BLOBs and CLOBs should be bound using stream operations.
- Since:
- 3.2
useConnectionToCreateLob
public boolean useConnectionToCreateLob()ShouldBlob,Clob, andNClobbe created solelyusingConnection.createBlob(),Connection.createClob(),andConnection.createNClob(), instead of allowing the use ofour own implementations.- Returns:
- True if these types should be instantiated using
Connection. - Since:
- 6.6
supportsOrdinalSelectItemReference
public boolean supportsOrdinalSelectItemReference()Does this dialect support references to result variables(i.e, select items) by column positions (1-origin) as definedby the select clause?- Returns:
- true if result variable references by column positions are supported; false otherwise.
- Since:
- 6.0.0
getNullOrdering
supportsNullPrecedence
public boolean supportsNullPrecedence()Does this dialect supportnulls firstandnulls last?requiresCastForConcatenatingNonStrings
public boolean requiresCastForConcatenatingNonStrings()Does this dialect/database require casting of non-string argumentsin theconcat()function?- Returns:
trueif casting usingcast()is required- Since:
- 6.2
requiresFloatCastingOfIntegerDivision
public boolean requiresFloatCastingOfIntegerDivision()Does this dialect require that integer divisions be wrapped incast()calls to tell the db parser the expected type.- Returns:
- True if integer divisions must be
cast()ed to float - Implementation Note:
- The culprit is HSQLDB.
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()Does this dialect support asking the result set its positioninginformation on forward-only cursors?Specifically, in the case of scrolling fetches, Hibernate needsto use
ResultSet.isAfterLast()andResultSet.isBeforeFirst(). Certain drivers do not allowaccess to these methods for forward-only cursors.- Returns:
- True if methods like
ResultSet.isAfterLast()andResultSet.isBeforeFirst()are supported for forward only cursors; false otherwise. - Since:
- 3.2
- API Note:
- This is highly driver dependent!
supportsCircularCascadeDeleteConstraints
public boolean supportsCircularCascadeDeleteConstraints()Does this dialect support definition of cascade delete constraintswhich can cause circular chains?- Returns:
- True if circular cascade delete constraints are supported; false otherwise.
- Since:
- 3.2
supportsSubselectAsInPredicateLHS
public boolean supportsSubselectAsInPredicateLHS()Is a subselect supported as the left-hand side (LHS) of anINpredicates?In other words, is syntax like
<subquery> IN (1, 2, 3)supported?- Returns:
- True if a subselect can appear as the LHS of an in-predicate; false otherwise.
- Since:
- 3.2
supportsExpectedLobUsagePattern
public boolean supportsExpectedLobUsagePattern()"Expected" LOB usage pattern is such that I can perform an insert viaprepared statement with a parameter binding for a LOB value withoutcrazy casting to JDBC driver implementation-specific classes.- Returns:
- True if normal LOB usage patterns can be used with this driver; false if driver-specific hookiness needs to be applied.
- Since:
- 3.2
- Implementation Note:
- Part of the trickiness here is the fact that this is largely driver-dependent. For example, Oracle (which is notoriously bad with LOB support in their drivers historically) actually does a pretty good job with LOB support as of the 10.2.x v ersions of their driver.
supportsLobValueChangePropagation
public boolean supportsLobValueChangePropagation()Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator, as opposed to supplying a new locator instance.- 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).
- Returns:
- True if the changes are propagated back to the database; false otherwise.
- Since:
- 3.2
- Implementation Note:
- I do not know the correct answer currently for databases which (1) are not part of the cruise control process, or (2) do not
supportsExpectedLobUsagePattern().
- For BLOBs, the internal value might be changed by:
supportsUnboundedLobLocatorMaterialization
public boolean supportsUnboundedLobLocatorMaterialization()Is it supported to materialize a LOB locator outside the transactionin which it was created?- Returns:
- True if unbounded materialization is supported; false otherwise.
- Since:
- 3.2
- Implementation Note:
- Again, part of the trickiness here is the fact that this is largely driver-dependent. All database I have tested which
supportsExpectedLobUsagePattern()also support the ability to materialize a LOB outside the owning transaction.
supportsSubqueryOnMutatingTable
public boolean supportsSubqueryOnMutatingTable()Does this dialect support referencing the table being mutated in asubquery? The "table being mutated" is the table referenced in anupdate or delete query. And so can that table then be referencedin a subquery of the update or delete query?For example, would the following two syntaxes be supported:
delete from TABLE_A where ID not in (select ID from TABLE_A)update TABLE_A set NON_ID = 'something' where ID in (select ID from TABLE_A)
- Returns:
- True if this dialect allows references the mutating table from a subquery.
supportsExistsInSelect
public boolean supportsExistsInSelect()Does the dialect support an exists statement in the select clause?- Returns:
- True if exists checks are allowed in the select clause; false otherwise.
doesReadCommittedCauseWritersToBlockReaders
public boolean doesReadCommittedCauseWritersToBlockReaders()For the underlying database, isREAD_COMMITTEDisolationimplemented by forcing readers to wait for write locks to be released?- Returns:
- True if writers block readers to achieve
READ_COMMITTED; false otherwise.
doesRepeatableReadCauseReadersToBlockWriters
public boolean doesRepeatableReadCauseReadersToBlockWriters()For the underlying database, isREPEATABLE_READisolationimplemented by forcing writers to wait for read locks to be released?- Returns:
- True if readers block writers to achieve
REPEATABLE_READ; false otherwise.
supportsBindAsCallableArgument
public boolean supportsBindAsCallableArgument()Does this dialect support using a JDBC bind parameter as an argumentto a function or procedure call?- Returns:
- Returns
trueif the database supports accepting bind params as args,falseotherwise. The default istrue.
supportsTupleCounts
public boolean supportsTupleCounts()Does this dialect supportcount(a,b)?- Returns:
- True if the database supports counting tuples; false otherwise.
requiresParensForTupleCounts
public boolean requiresParensForTupleCounts()IfsupportsTupleCounts()is true, does this dialect requirethe tuple to be delimited with parentheses?- Returns:
- boolean
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()Does this dialect supportcount(distinct a,b)?- Returns:
- True if the database supports counting distinct tuples; false otherwise.
requiresParensForTupleDistinctCounts
public boolean requiresParensForTupleDistinctCounts()IfsupportsTupleDistinctCounts()is true, does this dialectrequire the tuple to be delimited with parentheses?- Returns:
- boolean
getInExpressionCountLimit
public int getInExpressionCountLimit()Return the limit that the underlying database places on the number ofelements in anINpredicate. If the database defines no suchlimits, simply return zero or a number smaller than zero.- Returns:
- The limit, or a non-positive integer to indicate no limit.
getParameterCountLimit
public int getParameterCountLimit()Return the limit that the underlying database places on the number of parametersthat can be defined for a PreparedStatement. If the database defines no suchlimits, simply return zero or a number smaller than zero. By default, Dialectreturns the same value asgetInExpressionCountLimit().- Returns:
- The limit, or a non-positive integer to indicate no limit.
forceLobAsLastValue
public boolean forceLobAsLastValue()Must LOB values occur last in inserts and updates?- Returns:
- boolean True if Lob values should be last, false if it does not matter.
- Implementation Note:
- Oracle is the culprit here, see HHH-4635.
isEmptyStringTreatedAsNull
public boolean isEmptyStringTreatedAsNull()Return whether the dialect considers an empty string value to be null.- Returns:
- boolean True if an empty string is treated as null, false otherwise.
- Implementation Note:
- Once again, the culprit is Oracle.
getUniqueDelegate
Get theUniqueDelegatesupported by this dialect- Returns:
- The UniqueDelegate
getQueryHintString
Apply a hint to the given SQL query.The entire query is provided, allowing full control over the placementand syntax of the hint.
By default, ignore the hint and simply return the query.
- Parameters:
query- The query to which to apply the hint.hintList- The hints to apply- Returns:
- The modified SQL
getQueryHintString
Apply a hint to the given SQL query.The entire query is provided, allowing full control over the placementand syntax of the hint.
By default, ignore the hint and simply return the query.
- Parameters:
query- The query to which to apply the hint.hints- The hints to apply- Returns:
- The modified SQL
defaultScrollMode
A defaultScrollModeto be used byQuery.scroll().- Returns:
- the default
ScrollModeto use. - API Note:
- Certain dialects support a subset of
ScrollModes.
supportsOffsetInSubquery
public boolean supportsOffsetInSubquery()Does this dialect supportoffsetin subqueries?For example:
select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1 offset 1)
- Returns:
trueif it does
supportsOrderByInSubquery
public boolean supportsOrderByInSubquery()Does this dialect support theorder byclause in subqueries?For example:
select * from Table1 where col1 in (select col1 from Table2 order by col2 limit 1)
- Returns:
trueif it does
supportsSubqueryInSelect
public boolean supportsSubqueryInSelect()Does this dialect support subqueries in theselectclause?For example:
select col1, (select col2 from Table2 where ...) from Table1
- Returns:
trueif it does
supportsInsertReturning
public boolean supportsInsertReturning()Does this dialect fully support returning arbitrary generated column valuesafter execution of aninsertstatement, using native SQL syntax?Support for identity columns is insufficient here, we require something like:
insert ... returning ..., orselect from final table (insert ... ).
- Returns:
trueifInsertReturningDelegateworks for any sort of primary key column (not just identity columns), orfalseifInsertReturningDelegatedoes not work, or only works for specialized identity/"autoincrement" columns- Since:
- 6.2
- See Also:
supportsInsertReturningRowId
public boolean supportsInsertReturningRowId()Does this dialect supports returning theRowIdcolumnafter execution of aninsertstatement, using native SQL syntax?- Returns:
trueis the dialect supports returning the rowid column- Since:
- 6.5
- See Also:
supportsUpdateReturning
public boolean supportsUpdateReturning()Does this dialect fully support returning arbitrary generated column valuesafter execution of anupdatestatement, using native SQL syntax?Defaults to the value of
supportsInsertReturning()but can be overriddento explicitly disable this for updates.- Since:
- 6.5
- See Also:
supportsInsertReturningGeneratedKeys
public boolean supportsInsertReturningGeneratedKeys()Does this dialect fully support returning arbitrary generated column valuesafter execution of aninsertstatement, using the JDBC methodConnection.prepareStatement(String, String[]).Support for returning the generated value of an identity column via the JDBCmethod
Connection.prepareStatement(String, int)is insufficient here.- Returns:
trueifGetGeneratedKeysDelegateworks for any sort of primary key column (not just identity columns), orfalseifGetGeneratedKeysDelegatedoes not work, or only works for specialized identity/"autoincrement" columns- Since:
- 6.2
- See Also:
unquoteGetGeneratedKeys
public boolean unquoteGetGeneratedKeys()Does this dialect require unquoting identifiers when passing them to theConnection.prepareStatement(String, String[])JDBC method.supportsFetchClause
Does this dialect support the givenFETCHclause type.- Parameters:
type- The fetch clause type- Returns:
trueif the underlying database supports the given fetch clause type,falseotherwise. The default isfalse.
supportsWindowFunctions
public boolean supportsWindowFunctions()Does this dialect support window functions likerow_number() over (..)?- Returns:
trueif the underlying database supports window functions,falseotherwise. The default isfalse.
supportsLateral
public boolean supportsLateral()Does this dialect support the SQLlateralkeyword or aproprietary alternative?- Returns:
trueif the underlying database supports lateral,falseotherwise. The default isfalse.
getCallableStatementSupport
TheCallableStatementSupportfor this database.Does this database support returning cursors?getNameQualifierSupport
Thesupport for qualified identifiers.By default, decide based on
DatabaseMetaData.- Returns:
- The
NameQualifierSupport, or null to useDatabaseMetaData.
getMultiKeyLoadSizingStrategy
The strategy used to determine the appropriate number of keysto load in a single SQL query with multi-key loading.getBatchLoadSizingStrategy
The strategy used to determine the appropriate number of keysto load in a single SQL query with batch-fetch loading.- See Also:
- Implementation Note:
- By default, the same asgetMultiKeyLoadSizingStrategy()
isJdbcLogWarningsEnabledByDefault
public boolean isJdbcLogWarningsEnabledByDefault()Is JDBC statement warning logging enabled by default?- Since:
- 5.1
augmentPhysicalTableTypes
augmentRecognizedTableTypes
supportsPartitionBy
public boolean supportsPartitionBy()Does is dialect supportpartition byin windowfunctions?- Since:
- 5.2
- API Note:
- This has nothing to do with table partitioning.
addPartitionKeyToPrimaryKey
Does this dialect require that the columns listed inpartition byalso occur in the primary key,when defining table partitioning?- Since:
- 7.1
- API Note:
- This has nothing to do with window functions.
supportsNamedParameters
- Throws:
SQLException- Accessing theDatabaseMetaDatacause an exception. Just rethrow and Hibernate will handle it.
getNationalizationSupport
Determines whether this database requires the use of explicitlynationalized character (Unicode) data types.That is, whether the use of
Types.NCHAR,Types.NVARCHAR,andTypes.NCLOBis required for nationalized character data.supportsNationalizedMethods
public boolean supportsNationalizedMethods()Checks whether the JDBC driver implements methods for handling nationalized character data typesResultSet.getNString(int)/PreparedStatement.setNString(int, String),ResultSet.getNClob(int)/PreparedStatement.setNClob(int, NClob),ResultSet.getNCharacterStream(int)/PreparedStatement.setNCharacterStream(int, Reader, long)- Returns:
trueif the driver implements these methods
getAggregateSupport
How does this dialect support aggregate types likeSqlTypes.STRUCT.- Since:
- 6.2
supportsUserDefinedTypes
public boolean supportsUserDefinedTypes()Does the database support user defined types?- Since:
- 7.1
- See Also:
supportsStandardArrays
public boolean supportsStandardArrays()Does this database have native support for ANSI SQL standard arrays whichare expressed in terms of the element type name:integer array.- Returns:
- boolean
- Since:
- 6.1
- Implementation Note:
- Oracle doesn't have this; we must instead use named array types.
useArrayForMultiValuedParameters
public boolean useArrayForMultiValuedParameters()Does this database prefer to use array types for multi-valued parameters.- Returns:
- boolean
- Since:
- 6.3
getArrayTypeName
appendArrayLiteral
public void appendArrayLiteral(SqlAppender appender,Object[] literal,JdbcLiteralFormatter<Object> elementFormatter,WrapperOptions wrapperOptions) Append an array literal with the given elements to the givenSqlAppender.supportsDistinctFromPredicate
public boolean supportsDistinctFromPredicate()Does this dialect support some kind ofdistinct frompredicate?That is, does it support syntax like:
... where FIRST_NAME IS DISTINCT FROM LAST_NAME
- Returns:
- True if this SQL dialect is known to support some kind of
distinct frompredicate; false otherwise - Since:
- 6.1
getPreferredSqlTypeCodeForArray
public int getPreferredSqlTypeCodeForArray()The JDBCtype code to use for mappingproperties of basic Java array orCollectiontypes.Usually
SqlTypes.ARRAYorSqlTypes.VARBINARY.- Returns:
- one of the type codes defined by
SqlTypes. - Since:
- 6.1
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()The JDBCtype code to use for mappingproperties of Java typeboolean.Usually
Types.BOOLEANorTypes.BIT.- Returns:
- one of the type codes defined by
Types.
supportsNonQueryWithCTE
public boolean supportsNonQueryWithCTE()Does this dialect support insert, update, and delete statementswith Common Table Expressions (CTEs)?- Returns:
trueif non-query statements are supported with CTE
supportsRecursiveCTE
public boolean supportsRecursiveCTE()Does this dialect/database support recursive CTEs?- Returns:
trueif recursive CTEs are supported- Since:
- 6.2
supportsConflictClauseForInsertCTE
public boolean supportsConflictClauseForInsertCTE()Does this dialect support theconflictclause for insert statementsthat appear in a CTE?- Returns:
trueifconflictclause is supported- Since:
- 6.5
supportsValuesList
public boolean supportsValuesList()Does this dialect supportvalueslists of formVALUES (1), (2), (3)?- Returns:
trueifvalueslist are supported
supportsValuesListForInsert
public boolean supportsValuesListForInsert()Does this dialect supportvalueslists of formVALUES (1), (2), (3)in insert statements?- Returns:
trueifvalueslist are allowed in insert statements
supportsFromClauseInUpdate
public boolean supportsFromClauseInUpdate()Does this dialect support thefromclause for update statements?- Returns:
trueiffromclause is supported- Since:
- 6.5
appendLiteral
Append a literal string to the givenSqlAppender.- API Note:
- Needed because MySQL has nonstandard escape characters
appendBinaryLiteral
Append a binary literal to the givenSqlAppender.supportsJdbcConnectionLobCreation
Check whether the JDBCConnectionsupports creating LOBs viaConnection.createBlob(),Connection.createNClob(), orConnection.createClob().- Parameters:
databaseMetaData- JDBCDatabaseMetaDatawhich can be used if LOB creation is supported only starting from a given driver version- Returns:
trueif LOBs can be created via the JDBC Connection.
supportsMaterializedLobAccess
public boolean supportsMaterializedLobAccess()Check whether the JDBC driver allows setting LOBs viaPreparedStatement.setBytes(int, byte[]),PreparedStatement.setNString(int, String), orPreparedStatement.setString(int, String)APIs.- Returns:
trueif LOBs can be set with the materialized APIs.- Since:
- 6.2
useMaterializedLobWhenCapacityExceeded
public boolean useMaterializedLobWhenCapacityExceeded()Whether to switch:- from
VARCHAR-like types toSqlTypes.MATERIALIZED_CLOBtypes when the requested size for a type exceeds thegetMaxVarcharCapacity(), - from
NVARCHAR-like types toSqlTypes.MATERIALIZED_NCLOBtypes when the requested size for a type exceeds thegetMaxNVarcharCapacity(), and - from
VARBINARY-like types toSqlTypes.MATERIALIZED_BLOBtypes when the requested size for a type exceeds thegetMaxVarbinaryCapacity().
- Returns:
trueif materialized LOBs should be used for capacity exceeding types.- Since:
- 6.2
- from
addSqlHintOrComment
Modify the SQL, adding hints or comments, if necessary.addUseIndexQueryHint
prependComment
escapeComment
getHqlTranslator
Return anHqlTranslatorspecific to this dialect, ornullto use the standard translator.Note that
QueryEngineOptions.getCustomHqlTranslator()has higherprecedence since it comes directly from the user config.- See Also:
StandardHqlTranslatorQueryEngine.getHqlTranslator()
getSqmTranslatorFactory
Return aSqmTranslatorFactoryspecific to this dialect, ornullto use the standard translator.Note that
QueryEngineOptions.getCustomSqmTranslatorFactory()has higherprecedence since it comes directly from the user config.- See Also:
StandardSqmTranslatorQueryEngine.getSqmTranslatorFactory()
getSqlAstTranslatorFactory
getGroupBySelectItemReferenceStrategy
Determine how selected items are referenced in thegroup byclause.getSizeStrategy
A customDialect.SizeStrategyfor column types.getMaxVarcharLength
public int getMaxVarcharLength()The biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.For longer column lengths, use some sort of
text-liketype for the column.getMaxNVarcharLength
public int getMaxNVarcharLength()The biggest size value that can be supplied as argument to aTypes.NVARCHAR-like type.For longer column lengths, use some sort of
ntext-liketype for the column.getMaxVarbinaryLength
public int getMaxVarbinaryLength()The biggest size value that can be supplied as argument to aTypes.VARBINARY-like type.For longer column lengths, use some sort of
image-liketype for the column.getMaxVarcharCapacity
public int getMaxVarcharCapacity()The longest possible length of aTypes.VARCHAR-likecolumn.For longer column lengths, use some sort of
clob-like typefor the column.getMaxNVarcharCapacity
public int getMaxNVarcharCapacity()The longest possible length of aTypes.NVARCHAR-likecolumn.For longer column lengths, use some sort of
nclob-like typefor the column.getMaxVarbinaryCapacity
public int getMaxVarbinaryCapacity()The longest possible length of aTypes.VARBINARY-likecolumn.For longer column lengths, use some sort of
blob-like type forthe column.getDefaultLobLength
getDefaultDecimalPrecision
public int getDefaultDecimalPrecision()This is the default precision for a generated column ofexact numeric typeDECIMALorNUMERICmapped to aBigIntegerorBigDecimal.Usually returns the maximum precision of thedatabase, except when there is no such maximumprecision, or the maximum precision is very high.
- Returns:
- the default precision, in decimal digits
- See Also:
getDefaultTimestampPrecision
public int getDefaultTimestampPrecision()This is the default precision for a generated column oftypeTIMESTAMPmapped to aTimestamporLocalDateTime.Usually 6 (microseconds) or 3 (milliseconds).
- Returns:
- the default precision, in decimal digits, of the fractional seconds field
- See Also:
getDefaultIntervalSecondScale
public int getDefaultIntervalSecondScale()This is the default scale for a generated column of typeINTERVAL SECONDmappedto aDuration.Usually 9 (nanoseconds) or 6 (microseconds).
- Returns:
- the default scale, in decimal digits, of the fractional seconds field
- See Also:
doesRoundTemporalOnOverflow
public boolean doesRoundTemporalOnOverflow()Does this dialect round a temporal when converting from a precision higher to a lower one?- Returns:
- true if rounding is applied, false if truncation is applied
getFloatPrecision
public int getFloatPrecision()This is the default precision for a generatedcolumn mapped to a JavaFloatorfloat. That is, a value representing"single precision".Usually 24 binary digits, at least fordatabases with a conventional interpretationof the ANSI SQL specification.
- Returns:
- a value representing "single precision", usually in binary digits, but sometimes in decimal digits
getDoublePrecision
public int getDoublePrecision()This is the default precision for a generatedcolumn mapped to a JavaDoubleordouble. That is, a value representing"double precision".Usually 53 binary digits, at least fordatabases with a conventional interpretationof the ANSI SQL specification.
- Returns:
- a value representing "double precision", usually in binary digits, but sometimes in decimal digits
getFractionalSecondPrecisionInNanos
public long getFractionalSecondPrecisionInNanos()The "native" precision for arithmetic with datetimesand day-to-second durations. Datetime differenceswill be calculated with this precision except when aprecision is explicitly specified as aTemporalUnit.Usually 1 (nanoseconds), 1_000 (microseconds), or1_000_000 (milliseconds).
- Returns:
- the precision, specified as a quantity of nanoseconds
- See Also:
- Implementation Note:
- Getting this right is very important. It would be great if all platforms supported datetime arithmetic with nanosecond precision, since that is how we represent
Duration. But they don't, and we don't want to fill up the SQL expression with many conversions to/from nanoseconds. (Not to mention the problems with numeric overflow that this sometimes causes.) So we need to pick the right value here, and implementtimestampaddPattern(TemporalUnit, TemporalType, IntervalType)andtimestampdiffPattern(TemporalUnit, TemporalType, TemporalType)consistent with our choice.
supportsBitType
supportsPredicateAsExpression
protected boolean supportsPredicateAsExpression()Whether a predicate likea > 0can appear in an expressioncontext, for example, in aselectlist item.getLockRowIdentifier
Obtain aRowLockStrategyfor the givenLockMode.generatedAs
hasDataTypeBeforeGeneratedAs
public boolean hasDataTypeBeforeGeneratedAs()Is an explicit column type required forgenerated ascolumns?- Returns:
trueif an explicit type is required
createOptionalTableUpdateOperation
public MutationOperation createOptionalTableUpdateOperation(EntityMutationTarget mutationTarget, org.hibernate.sql.model.internal.OptionalTableUpdate optionalTableUpdate,SessionFactoryImplementor factory) Create aMutationOperationfor a updating an optional tablecanDisableConstraints
public boolean canDisableConstraints()Is there some way to disable foreign key constraint checking whiletruncating tables? (If there's no way to do it, and if we can'tbatch truncate, we must drop andrecreate the constraints instead.)- Returns:
trueif there is some way to do it- See Also:
getDisableConstraintsStatement
A SQL statement that temporarily disables foreign key constraintchecking for all tables.getEnableConstraintsStatement
A SQL statement that re-enables foreign key constraint checking forall tables.getDisableConstraintStatement
getEnableConstraintStatement
canBatchTruncate
public boolean canBatchTruncate()Does thetruncate tablestatement accept multiple tables?- Returns:
trueif it does
getTruncateTableStatements
getTruncateTableStatement
getNativeParameterMarkerStrategy
Support for native parameter markers.This is generally dependent on both the database and the driver.- Returns:
- May return
nullto indicate that the JDBCstandard strategy should be used
supportsBatchUpdates
Whether this Dialect supportsbatch updates.- Returns:
trueindicates it does;falseindicates it does not;nullindicatesit might and that database-metadata should be consulted.- See Also:
supportsRefCursors
Whether this Dialect supports the JDBCTypes.REF_CURSORtype.- Returns:
trueindicates it does;falseindicates it does not;nullindicatesit might and that database-metadata should be consulted- See Also:
getDefaultOrdinalityColumnName
Returns the default name of the ordinality column for a set-returning functionif it supports that, otherwise returnsnull.appendDatetimeFormat
Translate the given datetime format string fromthe pattern language defined by Java'sDateTimeFormattertowhatever pattern language is understood by thenative datetime formatting function for thisdatabase (often theto_char()function).Since it's never possible to translate everypattern letter sequences understood by
DateTimeFormatter, only the followingsubset of pattern letters is accepted byHibernate:- 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 andsingle-quoted literal strings are accepted.
Appends a pattern accepted by the function thatformats dates and times in this dialect to aSQL fragment that is being constructed.
translateExtractField
Return the name used to identify the given fieldas 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.translateDurationField
Return the name used to identify the given unit ofduration as an argument to#timestampadd()or#timestampdiff(), or of this dialect'sequivalentfunctions.This method does not need to handle
TemporalUnit.NANOSECOND,TemporalUnit.NATIVE,TemporalUnit.OFFSET,TemporalUnit.DAY_OF_WEEK,TemporalUnit.DAY_OF_MONTH,TemporalUnit.DAY_OF_YEAR,TemporalUnit.DATE,TemporalUnit.TIME,TemporalUnit.TIMEZONE_HOUR,TemporalUnit.TIMEZONE_MINUTE,TemporalUnit.WEEK_OF_YEAR, norTemporalUnit.WEEK_OF_MONTH,which are not units of duration.appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender,TemporalAccessor temporalAccessor,TemporalType precision,TimeZone jdbcTimeZone) Append a datetime literal representing the givenjava.timevalue to the givenSqlAppender.appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender,Date date,TemporalType precision,TimeZone jdbcTimeZone) Append a datetime literal representing the givenDatevalue to the givenSqlAppender.appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender,Calendar calendar,TemporalType precision,TimeZone jdbcTimeZone) Append a datetime literal representing the givenCalendarvalue to the givenSqlAppender.appendIntervalLiteral
Append a literal SQLintervalrepresenting the given JavaDuration.appendIntervalLiteral
Append a literal SQLintervalrepresenting the given JavaTemporalAmount.appendUUIDLiteral
Append a literal SQLuuidrepresenting the given JavaUUID.This is usually a
cast()expression, but it might bea function call.supportsTemporalLiteralOffset
public boolean supportsTemporalLiteralOffset()Does this dialect supports timezone offsets in temporal literals.getTimeZoneSupport
How the dialect supports time zone types likeTypes.TIMESTAMP_WITH_TIMEZONE.rowId
The name of arowid-like pseudo-column whichacts as a high-performance row locator, or null ifthis dialect has no such pseudo-column.If the
rowid-like value is an explicitly-declarednamed column instead of an implicit pseudo-column, and ifthe given name is nonempty, return the given name.- Parameters:
rowId- the name specified byRowId.value(), which is ignored ifgetRowIdColumnString(String)is not overridden
rowIdSqlType
public int rowIdSqlType()The JDBC type code of therowid-like pseudo-columnwhich acts as a high-performance row locator.- Returns:
Types.ROWIDby default
getRowIdColumnString
getDmlTargetColumnQualifierSupport
Get the minimumDmlTargetColumnQualifierSupportrequired by this dialect.- Returns:
- the column qualifier support required by this dialect
getFunctionalDependencyAnalysisSupport
Get this dialect's level of support for primary key functional dependency analysiswithinGROUP BYandORDER BYclauses.getCheckConstraintString
Render a SQL check condition forCheckConstraint- Returns:
- a SQL expression representing the
CheckConstraint
appendCheckConstraintOptions
@Internal@Incubatingpublic String appendCheckConstraintOptions(CheckConstraint checkConstraint,String sqlCheckConstraint) Append theoptions to the given DDLstring declaring a SQLcheckconstraint.- Parameters:
checkConstraint- an instance ofCheckConstraintsqlCheckConstraint- the SQL to append theCheckConstraintoptions- Returns:
- a SQL expression
- Since:
- 7.0
supportsTableOptions
Deprecated, for removal: This API element is subject to removal in a future version.Does this dialect support appending table options SQL fragment at the end of the SQL table creation statement?- Returns:
trueindicates it does;falseindicates it does not;- Since:
- 7.0
supportsBindingNullSqlTypeForSetNull
public boolean supportsBindingNullSqlTypeForSetNull()Does this dialect support bindingTypes.NULLforPreparedStatement.setNull(int, int)?If it does, then the call toPreparedStatement.getParameterMetaData()may be skipped forbetter performance.- Returns:
trueindicates it does;falseindicates it does not;- See Also:
supportsBindingNullForSetObject
public boolean supportsBindingNullForSetObject()Does this dialect support bindingnullforPreparedStatement.setObject(int, Object)?if it does, then call ofPreparedStatement.getParameterMetaData()could be eliminated for better performance.- Returns:
trueindicates it does;falseindicates it does not;- See Also:
supportsFilterClause
public boolean supportsFilterClause()Whether the FILTER clause for aggregate functions is supported.supportsRowConstructor
public boolean supportsRowConstructor()Whether the SQL row constructor is supported.supportsArrayConstructor
public boolean supportsArrayConstructor()Whether the SQL array constructor is supported.supportsDuplicateSelectItemsInQueryGroup
public boolean supportsDuplicateSelectItemsInQueryGroup()supportsIntersect
public boolean supportsIntersect()supportsJoinInMutationStatementSubquery
public boolean supportsJoinInMutationStatementSubquery()If the dialect supports using joins in mutation statement subquerythat could also use columns from the mutation target tablesupportsJoinsInDelete
public boolean supportsJoinsInDelete()supportsNestedSubqueryCorrelation
public boolean supportsNestedSubqueryCorrelation()supportsRecursiveCycleClause
public boolean supportsRecursiveCycleClause()Whether the SQL cycle clause is supported, which can be used for recursive CTEs.supportsRecursiveCycleUsingClause
public boolean supportsRecursiveCycleUsingClause()Whether the SQL cycle clause supports the using sub-clause.supportsRecursiveSearchClause
public boolean supportsRecursiveSearchClause()Whether the SQL search clause is supported, which can be used for recursive CTEs.supportsSimpleQueryGrouping
public boolean supportsSimpleQueryGrouping()supportsCrossJoin
public boolean supportsCrossJoin()Is thecross joinsyntax supported?supportsRowValueConstructorSyntax
public boolean supportsRowValueConstructorSyntax()Is this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax; false otherwise.
supportsRowValueConstructorGtLtSyntax
public boolean supportsRowValueConstructorGtLtSyntax()Is this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax with<,>,≤and≥operators.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) < ('Steve', 'Ebersole') ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax with relational comparison operators; false otherwise.
supportsRowValueConstructorDistinctFromSyntax
public boolean supportsRowValueConstructorDistinctFromSyntax()Is this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax withis distinct fromandis not distinct fromoperators.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) is distinct from ('Steve', 'Ebersole') ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax with distinct from comparison operators; false otherwise.
supportsWithClause
public boolean supportsWithClause()Whether the SQL with clause is supported.supportsWithClauseInSubquery
public boolean supportsWithClauseInSubquery()Whether the SQL with clause is supported within a subquery.supportsNestedWithClause
public boolean supportsNestedWithClause()Whether the SQL with clause is supported within a CTE.supportsRowValueConstructorSyntaxInQuantifiedPredicates
public boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()Is this dialect known to support what ANSI-SQL terms "row valueconstructor" syntax; sometimes called tuple syntax with quantified predicates.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ALL (select ...) ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax with quantified predicates; false otherwise.
supportsRowValueConstructorSyntaxInInList
public boolean supportsRowValueConstructorSyntaxInInList()If the dialect supportsrow values,does it offer such support in IN lists as well?For example,
... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax in the IN list; false otherwise.
supportsRowValueConstructorSyntaxInInSubQuery
public boolean supportsRowValueConstructorSyntaxInInSubQuery()If the dialect supportsrow values,does it offer such support in IN subqueries as well?For example,
... where (FIRST_NAME, LAST_NAME) IN ( select ... ) ...- Returns:
- True if this SQL dialect is known to support "row valueconstructor" syntax in the IN subqueries; false otherwise.