Top Description Fields Constructors Methods
org.hibernate.dialect

public Class DerbyDialect

extends Dialect
Class Inheritance
Imports
java.sql.DatabaseMetaData, .SQLException, .Types, org.hibernate.boot.model.FunctionContributions, .TypeContributions, org.hibernate.dialect.function.CaseLeastGreatestEmulation, .CastingConcatFunction, .ChrLiteralEmulation, .CommonFunctionFactory, .CountFunction, .DerbyLpadEmulation, .DerbyRpadEmulation, .InsertSubstringOverlayEmulation, org.hibernate.dialect.identity.DB2IdentityColumnSupport, .IdentityColumnSupport, org.hibernate.dialect.pagination.DerbyLimitHandler, .LimitHandler, org.hibernate.dialect.sequence.DerbySequenceSupport, .SequenceSupport, org.hibernate.dialect.temptable.TemporaryTable, .TemporaryTableKind, org.hibernate.dialect.unique.CreateTableUniqueDelegate, .UniqueDelegate, org.hibernate.engine.jdbc.Size, org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo, org.hibernate.engine.jdbc.env.spi.IdentifierHelper, .IdentifierHelperBuilder, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.exception.LockTimeoutException, org.hibernate.exception.spi.SQLExceptionConversionDelegate, org.hibernate.internal.util.JdbcExceptionHelper, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.query.sqm.CastType, .IntervalType, .TemporalUnit, org.hibernate.query.sqm.mutation.internal.temptable.BeforeUseAction, .GlobalTemporaryTableMutationStrategy, .LocalTemporaryTableInsertStrategy, .LocalTemporaryTableMutationStrategy, org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy, .SqmMultiTableMutationStrategy, org.hibernate.service.ServiceRegistry, org.hibernate.sql.ast.SqlAstNodeRenderingMode, .SqlAstTranslator, .SqlAstTranslatorFactory, org.hibernate.sql.ast.spi.SqlAppender, .StandardSqlAstTranslatorFactory, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.exec.spi.JdbcOperation, org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorDerbyDatabaseImpl, org.hibernate.tool.schema.extract.spi.SequenceInformationExtractor, org.hibernate.type.BasicType, .BasicTypeRegistry, .JavaObjectType, .StandardBasicTypes, org.hibernate.type.descriptor.java.BigDecimalJavaType, org.hibernate.type.descriptor.jdbc.DecimalJdbcType, .ObjectNullResolvingJdbcType, .TimestampJdbcType, org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry, org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType, org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry, org.hibernate.type.spi.TypeConfiguration, jakarta.persistence.TemporalType

A SQL dialect for Apache Derby 10.15.2 and above.
Authors
Simon Johnston, Gavin King

Field Summary

Modifier and TypeField and Description
private final LimitHandler
private static final DatabaseVersion
private final UniqueDelegate
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTELEGACY_LOB_MERGE_STRATEGYLOG_BASE2OF10NEW_LOCATOR_LOB_MERGE_STRATEGYQUOTESTANDARD_MULTI_KEY_LOAD_SIZING_STRATEGYSTREAM_XFER_LOB_MERGE_STRATEGY

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
appendBooleanValueString(SqlAppender
The SqlAppender to append the literal expression to
appender
,
boolean
The boolean value
bool
)

Overrides org.hibernate.dialect.Dialect.appendBooleanValueString.

Append the SQL literal expression representing the given boolean value to the given SqlAppender.
public void
appendDatetimeFormat(SqlAppender appender, String format)

Overrides org.hibernate.dialect.Dialect.appendDatetimeFormat.

Translate the given datetime format string from the pattern language defined by Java's java.time.format.DateTimeFormatter to whatever pattern language is understood by the native datetime formatting function for this database (often the to_char() function).
public IdentifierHelper
buildIdentifierHelper(IdentifierHelperBuilder
A partially-configured IdentifierHelperBuilder.
builder
,
DatabaseMetaData
Access to the metadata returned from the driver if needed and if available

Warning

it may be null.

dbMetaData
)

Overrides org.hibernate.dialect.Dialect.buildIdentifierHelper.

The IdentifierHelper indicated by this dialect for handling identifier conversions.
public SQLExceptionConversionDelegate
public String
castPattern(CastType
a CastType indicating the type of the value argument
from
,
CastType
a CastType indicating the type the value argument is cast to
to
)

Overrides org.hibernate.dialect.Dialect.castPattern.

Derby does have a real Types#BOOLEAN type, but it doesn't know how to cast to it.
protected String
columnType(int
a SQL type code
sqlTypeCode
)

Overrides org.hibernate.dialect.Dialect.columnType.

The database column type name for a given JDBC type code defined in Types or SqlTypes.
public void
contributeTypes(TypeContributions
Callback to contribute the types
typeContributions
,
ServiceRegistry
The service registry
serviceRegistry
)

Overrides org.hibernate.dialect.Dialect.contributeTypes.

A callback which allows the Dialect to contribute types.
public boolean
doesReadCommittedCauseWritersToBlockReaders()

Overrides org.hibernate.dialect.Dialect.doesReadCommittedCauseWritersToBlockReaders.

For the underlying database, is READ_COMMITTED isolation implemented by forcing readers to wait for write locks to be released?
public String
extractPattern(TemporalUnit
the first argument
unit
)

Overrides org.hibernate.dialect.Dialect.extractPattern.

Derby doesn't have an extract() function, and has no functions at all for calendaring, but we can emulate the most basic functionality of extract() using the functions it does have.
public String
getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

The command used to retrieve the current timestamp from the database.
public int
getDefaultDecimalPrecision()

Overrides org.hibernate.dialect.Dialect.getDefaultDecimalPrecision.

This is the default precision for a generated column mapped to a java.math.BigInteger or java.math.BigDecimal.
public int
getDefaultStatementBatchSize()

Overrides org.hibernate.dialect.Dialect.getDefaultStatementBatchSize.

The default value to use for the configuration property hibernate.jdbc.batch_size.
public int
getDoublePrecision()

Overrides org.hibernate.dialect.Dialect.getDoublePrecision.

This is the default precision for a generated column mapped to a Java Double or double.
public String[]
getDropSchemaCommand(String
The name of the schema to be dropped.
schemaName
)

Overrides org.hibernate.dialect.Dialect.getDropSchemaCommand.

Get the SQL command used to drop the named schema.
public SqmMultiTableInsertStrategy
public SqmMultiTableMutationStrategy
public int
getFloatPrecision()

Overrides org.hibernate.dialect.Dialect.getFloatPrecision.

This is the default precision for a generated column mapped to a Java Float or float.
public String
getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire pessimistic UPGRADE locks for this dialect.
public IdentityColumnSupport
public int
getInExpressionCountLimit()

Overrides org.hibernate.dialect.Dialect.getInExpressionCountLimit.

Return the limit that the underlying database places on the number of elements in an IN predicate.
public LimitHandler
public int
public int
getMaxVarcharLength()

Overrides org.hibernate.dialect.Dialect.getMaxVarcharLength.

The biggest size value that can be supplied as argument to a java.sql.Types#VARCHAR-like type.
protected DatabaseVersion
getMinimumSupportedVersion()

Overrides org.hibernate.dialect.Dialect.getMinimumSupportedVersion.

Get the version of the SQL dialect that is the minimum supported by this implementation.
public NationalizationSupport
getNationalizationSupport()

Overrides org.hibernate.dialect.Dialect.getNationalizationSupport.

Determines whether this database requires the use of explicitly nationalized character (Unicode) data types.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public String
getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect.
public RowLockStrategy
public String
getSelectClauseNullString(int
The Types type code.
sqlType
,
TypeConfiguration
The type configuration
typeConfiguration
)

Overrides org.hibernate.dialect.Dialect.getSelectClauseNullString.

Given a JDBC type code, return the expression for a literal null value of that type, to use in a select clause.
public SequenceInformationExtractor
public SequenceSupport
public SqlAstTranslatorFactory
public TemporaryTableKind
getSupportedTemporaryTableKind()

Overrides org.hibernate.dialect.Dialect.getSupportedTemporaryTableKind.

The kind of temporary tables that are supported on this database.
public BeforeUseAction
getTemporaryTableBeforeUseAction()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableBeforeUseAction.

The action to take before beginning use of a temporary table.
public String
public String
getTemporaryTableCreateOptions()

Overrides org.hibernate.dialect.Dialect.getTemporaryTableCreateOptions.

An arbitrary SQL fragment appended to the end of the statement to create a temporary table, specifying dialect-specific options, or null if there are no options to specify.
public UniqueDelegate
public String
getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire pessimistic WRITE locks for this dialect.
public RowLockStrategy
public void
initializeFunctionRegistry(FunctionContributions functionContributions)

Overrides org.hibernate.dialect.Dialect.initializeFunctionRegistry.

Initialize the given registry with any dialect-specific functions.
public boolean
protected void
registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)

Overrides org.hibernate.dialect.Dialect.registerColumnTypes.

Register ANSI-standard column types using the length limits defined by getMaxVarcharLength(), getMaxNVarcharLength(), and getMaxVarbinaryLength().
protected void
registerDefaultKeywords()

Overrides org.hibernate.dialect.Dialect.registerDefaultKeywords.

Register the reserved words of ANSI-standard SQL as keywords.
public boolean
requiresCastForConcatenatingNonStrings()

Overrides org.hibernate.dialect.Dialect.requiresCastForConcatenatingNonStrings.

Does this dialect/database require casting of non-string arguments in the concat() function?
public boolean
supportsCommentOn()

Overrides org.hibernate.dialect.Dialect.supportsCommentOn.

Does this dialect support commenting on tables and columns?
public boolean
supportsCurrentTimestampSelection()

Overrides org.hibernate.dialect.Dialect.supportsCurrentTimestampSelection.

Does this dialect support some way to retrieve the current timestamp value from the database?
public boolean
supportsExistsInSelect()

Overrides org.hibernate.dialect.Dialect.supportsExistsInSelect.

Does the dialect support an exists statement in the select clause?
public boolean
supportsLobValueChangePropagation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropagation.

Does the dialect support propagating changes to LOB values back to the database?
public boolean
supportsLockTimeouts()

Overrides org.hibernate.dialect.Dialect.supportsLockTimeouts.

Does this dialect support specifying timeouts when requesting locks.
public boolean
supportsOrderByInSubquery()

Overrides org.hibernate.dialect.Dialect.supportsOrderByInSubquery.

Does this dialect support the order by clause in subqueries?
public boolean
supportsOuterJoinForUpdate()

Overrides org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

Does this dialect support FOR UPDATE in conjunction with outer-joined rows?
public boolean
supportsPartitionBy()

Overrides org.hibernate.dialect.Dialect.supportsPartitionBy.

Does is dialect support partition by?
public boolean
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()

Overrides org.hibernate.dialect.Dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor.

Does this dialect support asking the result set its positioning information on forward-only cursors?
public boolean
supportsTemporaryTablePrimaryKey()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTablePrimaryKey.

Does this database support primary keys for temporary tables?
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support count(distinct a,b)?
public boolean
supportsUnboundedLobLocatorMaterialization()

Overrides org.hibernate.dialect.Dialect.supportsUnboundedLobLocatorMaterialization.

Is it supported to materialize a LOB locator outside the transaction in which it was created?
public boolean
supportsWindowFunctions()

Overrides org.hibernate.dialect.Dialect.supportsWindowFunctions.

Does this dialect support window functions like row_number() over (..)?
public String
timestampaddPattern(TemporalUnit
The unit to add to the temporal
unit
,
TemporalType
The type of the temporal
temporalType
,
IntervalType
The type of interval to add or null if it's not a native interval
intervalType
)

Overrides org.hibernate.dialect.Dialect.timestampaddPattern.

Obtain a pattern for the SQL equivalent to a timestampadd() function call.
public String
timestampdiffPattern(TemporalUnit
the first argument
unit
,
TemporalType
true if the first argument is a timestamp, false if a date
fromTemporalType
,
TemporalType
true if the second argument is
toTemporalType
)

Overrides org.hibernate.dialect.Dialect.timestampdiffPattern.

Obtain a pattern for the SQL equivalent to a timestampdiff() function call.
public String
translateExtractField(TemporalUnit unit)

Overrides org.hibernate.dialect.Dialect.translateExtractField.

Return the name used to identify the given field as an argument to the extract() function, or of this dialect's equivalent function.
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendArrayLiteralappendBinaryLiteralappendDateTimeLiteralappendDateTimeLiteralappendDateTimeLiteralappendIntervalLiteralappendLiteralappendLockHintappendUUIDLiteralapplyLocksToSqlaugmentPhysicalTableTypesaugmentRecognizedTableTypescanBatchTruncatecanCreateCatalogcanCreateSchemacanDisableConstraintscastTypecheckVersioncloseQuotecontributecontributeFunctionscreateOptionalTableUpdateOperationcurrentDatecurrentLocalTimecurrentLocalTimestampcurrentTimecurrentTimestampcurrentTimestampWithTimeZonedefaultScrollModedoesRepeatableReadCauseReadersToBlockWritersdropConstraintsequivalentTypesescapeCommentforceLobAsLastValuegeneratedAsgetAddColumnStringgetAddColumnSuffixStringgetAddForeignKeyConstraintStringgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetAggregateSupportgetAlterColumnTypeStringgetAlterTableStringgetArrayTypeNamegetAuxiliaryDatabaseObjectExportergetBatchLoadSizingStrategygetCallableStatementSupportgetCascadeConstraintsStringgetCaseInsensitiveLikegetCheckConditiongetCheckConditiongetCheckConditiongetCheckConditiongetColumnAliasExtractorgetColumnCommentgetCreateCatalogCommandgetCreateEnumTypeCommandgetCreateEnumTypeCommandgetCreateIndexStringgetCreateIndexTailgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCreateUserDefinedTypeExtensionsStringgetCreateUserDefinedTypeKindStringgetCurrentSchemaCommandgetDefaultIntervalSecondScalegetDefaultLobLengthgetDefaultNonContextualLobCreationgetDefaultPropertiesgetDefaultTimestampPrecisiongetDefaultUseGetGeneratedKeysgetDisableConstraintsStatementgetDisableConstraintStatementgetDmlTargetColumnQualifierSupportgetDropCatalogCommandgetDropEnumTypeCommandgetDropEnumTypeCommandgetDropForeignKeyStringgetDropTableStringgetDropUniqueKeyStringgetEnableConstraintsStatementgetEnableConstraintStatementgetEnumTypeDeclarationgetEnumTypeDeclarationgetFallbackSchemaManagementToolgetForeignKeyExportergetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFractionalSecondPrecisionInNanosgetFunctionalDependencyAnalysisSupportgetGroupBySelectItemReferenceStrategygetHqlTranslatorgetIndexExportergetKeywordsgetLobMergeStrategygetLockingStrategygetLockRowIdentifiergetLowercaseFunctiongetMaxAliasLengthgetMaxIdentifierLengthgetMaxNVarcharCapacitygetMaxNVarcharLengthgetMaxVarbinaryCapacitygetMaxVarbinaryLengthgetMultiKeyLoadSizingStrategygetNameQualifierSupportgetNativeIdentifierGeneratorStrategygetNativeParameterMarkerStrategygetNoColumnsInsertStringgetNullColumnStringgetNullColumnStringgetNullOrderinggetParameterCountLimitgetPreferredSqlTypeCodeForArraygetPreferredSqlTypeCodeForBooleangetQueryHintStringgetQueryHintStringgetReadLockStringgetResultSetgetResultSetgetResultSetgetRowIdColumnStringgetSchemaNameResolvergetSelectGUIDStringgetSequenceExportergetSizeStrategygetSqmTranslatorFactorygetTableCleanergetTableCommentgetTableExportergetTableMigratorgetTableTypeStringgetTemporaryTableAfterUseActiongetTemporaryTableDdlTransactionHandlinggetTemporaryTableDropCommandgetTemporaryTableExportergetTemporaryTableTruncateCommandgetTimeoutInSecondsgetTimeZoneSupportgetTruncateTableStatementgetTruncateTableStatementsgetUniqueKeyExportergetUserDefinedTypeCommentgetUserDefinedTypeExportergetVersiongetViolatedConstraintNameExtractorgetWriteLockStringhasAlterTablehasDataTypeBeforeGeneratedAshasSelfReferentialForeignKeyBuginitDefaultPropertiesinlineLiteralisAnsiNullOnisEmptyStringTreatedAsNullisJdbcLogWarningsEnabledByDefaultisLobisLockTimeoutParameterizedopenQuoteordinalprependCommentqualifyIndexNamequotequoteCollationregisterKeywordregisterKeywordsregisterResultSetOutParameterregisterResultSetOutParameterrequiresFloatCastingOfIntegerDivisionrequiresParensForTupleCountsrequiresParensForTupleDistinctCountsresolveSqlTypeCoderesolveSqlTypeCoderesolveSqlTypeDescriptorresolveSqlTypeLengthrowIdrowIdSqlTypesupportsAlterColumnTypesupportsBatchUpdatessupportsBindAsCallableArgumentsupportsBitTypesupportsCascadeDeletesupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsDistinctFromPredicatesupportsExpectedLobUsagePatternsupportsFetchClausesupportsFractionalTimestampArithmeticsupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTableNamesupportsIfExistsAfterTypeNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTableNamesupportsIfExistsBeforeTypeNamesupportsInsertReturningsupportsInsertReturningGeneratedKeyssupportsIsTruesupportsJdbcConnectionLobCreationsupportsLateralsupportsMaterializedLobAccesssupportsNamedParameterssupportsNoColumnsInsertsupportsNonQueryWithCTEsupportsNoWaitsupportsNullPrecedencesupportsOffsetInSubquerysupportsOrdinalSelectItemReferencesupportsParametersInInsertSelectsupportsPredicateAsExpressionsupportsRecursiveCTEsupportsRefCursorssupportsSkipLockedsupportsStandardArrayssupportsStandardCurrentTimestampFunctionsupportsSubqueryInSelectsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTemporalLiteralOffsetsupportsTemporaryTablessupportsTruncateWithCastsupportsTupleCountssupportsUnionAllsupportsUnionInSubquerysupportsValuesListsupportsValuesListForInsertsupportsWaittoBooleanValueStringtoQuotedIdentifiertoStringtransformSelectStringtranslateDurationFieldtrimPatterntrimPatternuseArrayForMultiValuedParametersuseFollowOnLockinguseInputStreamToInsertBlobuseMaterializedLobWhenCapacityExceeded