Class SpannerPostgreSQLDialect
- All Implemented Interfaces:
FunctionContributor, TypeContributor, ConversionContext
-
Nested Class Summary
Nested classes/interfaces inherited from class Dialect
Dialect.SizeStrategy, Dialect.SizeStrategyImpl -
Field Summary
FieldsFields inherited from class PostgreSQLDialect
driverKind, MINIMUM_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this dialect require that the columns listed inpartition byalso occur in the primary key, when defining table partitioning?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.An instance ofSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.booleanDoes thetruncate tablestatement accept multiple tables?castPattern(CastType from, CastType to) Obtain a pattern for the SQL equivalent to acast()function call.protected StringcastType(int sqlTypeCode) The SQL type to use incast( ... as ... )expressions when casting to the target type represented by the given JDBC type code.protected StringcolumnType(int sqlTypeCode) protected voidcontributePostgreSQLTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Allow for extension points to override this onlyvoidcontributeTypes(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 to the Java typeLocalTimewhich is a time with no time zone.Translation of the HQLlocal_datetimefunction, which maps to the Java typeLocalDateTimewhich is a datetime with no time zone.Translation of the HQL/JPQLcurrent_timefunction, which maps to the Java typeTimewhich is a time with no time zone.Translation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typeTimestampwhich is a datetime with no time zone.datetimeFormat(String format) A defaultScrollModeto be used byQuery.scroll().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.How does this dialect support aggregate types likeSqlTypes.STRUCT.getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) The SQL type name for the array type with elements of the given type name.A command to execute before dropping tables.TheCallableStatementSupportfor this database.The keyword that specifies that adrop tableoperation should be cascaded to its constraints, typically" cascade"where the leading space is required, or the empty string if there is no such keyword in this dialect.getCheckCondition(String columnName, Long[] values) Render a SQL check condition for a column that represents an enumerated value by its ordinal representation or a given list of values.getCheckCondition(String columnName, String[] values) Render a SQL check condition for a column that represents an enumerated value by its string representation or 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.Get the SQL command used to retrieve the current schema name.getDual()Returns a table expression that has one row.getFallbackSqmInsertStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext) TheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().Retrieves theFOR UPDATE NOWAITsyntax specific to this dialect.getForUpdateNowaitString(String aliases) Get theFOR UPDATE OF column_list NOWAITfragment appropriate for 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 appropriate for this dialect, given the aliases of the columns to be write-locked.Get the string to append toSELECTstatements to acquire pessimistic UPGRADE locks for this dialect.getForUpdateString(String aliases) Get theFOR UPDATE OF column_listfragment appropriate for this dialect, given the aliases of the columns that are to be write-locked.Get this dialect's level of support for primary key functional dependency analysis withinGROUP BYandORDER BYclauses.@Nullable TemporaryTableStrategyThe strategy to use for global temporary tables.intReturn the limit that the underlying database places on the number of elements in anINpredicate.getInformationExtractor(ExtractionContext extractionContext) AInformationExtractorwhich is able to extract table, primary key, foreign key, index information etc.Obtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).The strategy to use for local temporary tables.getLockingClauseStrategy(QuerySpec querySpec, LockOptions lockOptions) Strategy for handling locking clause as part of SqlAstTranslator.Access to various details and operations related to this Dialect's support for pessimistic locking.intThe biggest size value that can be supplied as argument to aTypes.VARBINARY-like type.intThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.The strategy to use for persistent temporary tables.getReadLockString(int timeout) Get the string to append toSELECTstatements to acquire READ locks for this dialect.getReadLockString(Timeout timeout) Get the string to append toSELECTstatements to acquire READ locks for this dialect.getReadLockString(String aliases, int timeout) Get the string to append toSELECTstatements to acquire READ locks for this dialect, given the aliases of the columns to be read locked.getReadLockString(String aliases, Timeout timeout) Get the string to append toSELECTstatements to acquire READ locks for this dialect, given the aliases of the columns to be read locked.Get the appropriateSequenceSupportfor this dialect.org.hibernate.tool.schema.internal.StandardTableExportergetTruncateTableStatement(String tableName) A SQL statement that truncates the given table.Get theUniqueDelegatesupported by this dialectgetWriteLockString(int timeout) Get the string to append toSELECTstatements to acquire pessimistic WRITE locks for this dialect.getWriteLockString(Timeout timeout) Get the string to append toSELECTstatements to acquire pessimistic WRITE locks for this dialect.getWriteLockString(String aliases, int timeout) Get the string to append toSELECTstatements to acquire WRITE locks for this dialect, given the aliases of the columns to be WRITE locked.getWriteLockString(String aliases, Timeout timeout) Get the string to append toSELECTstatements to acquire WRITE locks for this dialect, given the aliases of the columns to be WRITE locked.protected voidSet appropriate default values for configuration properties.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Initialize the given registry with any dialect-specific functions.protected voidregisterArrayFunctions(CommonFunctionFactory functionFactory) protected voidregisterJsonFunction(CommonFunctionFactory functionFactory) protected voidregisterPostgreSQLColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) protected voidregisterUtilityFunctions(FunctionContributions functionContributions) protected voidregisterXmlFunctions(CommonFunctionFactory functionFactory) protected IntegerresolveSqlTypeCode(String columnTypeName, TypeConfiguration typeConfiguration) Resolves theSqlTypestype code for the given column type name as reported by the database, ornullif it can't be resolved.The name of arowid-like pseudo-column which acts as a high-performance row locator, or null if this dialect has no such pseudo-column.booleanDoes this dialect support case-insensitiveLIKEcomparisons?booleanDoes this dialect support commenting on tables and columns?booleanDoes this dialect support defining the column list in the CTE header?booleanDoes this dialect support some kind ofdistinct frompredicate?booleanDoes this dialect support the givenFETCHclause type.booleanWhether the FILTER clause for aggregate functions is supported.booleanDoes this dialect support thefromclause for update statements?booleanFor analter table, can the phraseif existsbe applied?booleanFor dropping a constraint with analter tablestatement, can the phraseif existsbe applied before the constraint name?booleanDoes this dialect support the SQLlateralkeyword or a proprietary alternative?booleanWhether the SQL with clause is supported within a CTE.booleanDoes is dialect supportpartition byin window functions?booleanDoes this dialect/database support 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.booleanWhether the SQL row constructor is supported.booleanIs this dialect known to support what ANSI SQL calls the row value constructor syntax with the<>,<=and>=operators.booleanIs this dialect known to support what ANSI SQL calls the row value constructor syntax, sometimes called "tuples".booleanIf the dialect supports row value constructors, does it allow them inINsubqueries?booleanIs this dialect known to support what ANSI SQL calls the row value constructor syntax with quantified predicates.booleanDoes this dialect supportcount(a,b)?booleanDoes this dialect supportcount(distinct a,b)?booleanbooleanDoes the database support user-defined types?booleanDoes this dialect supportvalueslists of formVALUES (1), (2), (3)?booleanDoes this dialect support window functions likerow_number() over (..)?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.booleanMethods inherited from class PostgreSQLDialect
addSqlHintOrComment, appendBinaryLiteral, appendBooleanValueString, appendDatetimeFormat, augmentRecognizedTableTypes, buildIdentifierHelper, causesRollback, currentTimestampWithTimeZone, extractPattern, generatedAs, getAlterColumnTypeString, getCaseInsensitiveLike, getCreateEnumTypeCommand, getCurrentTimestampSelectString, getDefaultIntervalSecondScale, getDefaultNonContextualLobCreation, getDefaultOrdinalityColumnName, getDefaultStatementBatchSize, getDmlTargetColumnQualifierSupport, getDriverKind, getDropEnumTypeCommand, getEnumTypeDeclaration, getForUpdateString, getFractionalSecondPrecisionInNanos, getGroupBySelectItemReferenceStrategy, getIdentityColumnSupport, getMaxIdentifierLength, getMaxVarcharCapacity, getMinimumSupportedVersion, getNameQualifierSupport, getNationalizationSupport, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getNoColumnsInsertString, getQueryHintString, getQuerySequencesString, getResultSet, getResultSet, getResultSet, getSelectClauseNullString, getSelectClauseNullString, getTemporalTableSupport, getTimeZoneSupport, getViolatedConstraintNameExtractor, isCurrentTimestampSelectStringCallable, isCurrentTimestampStable, qualifyIndexName, quoteCollation, registerColumnTypes, registerResultSetOutParameter, requiresParensForTupleDistinctCounts, resolveSqlTypeDescriptor, rowIdSqlType, supportsAlterColumnType, supportsArrayConstructor, supportsBindingNullSqlTypeForSetNull, supportsConflictClauseForInsertCTE, supportsCurrentTimestampSelection, supportsIfExistsBeforeIndexName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsLobValueChangePropagation, supportsMaterializedLobAccess, supportsMinMaxOnUuid, supportsNonQueryWithCTE, supportsNotNullAfterGeneratedAs, supportsOffsetInSubquery, supportsRecursiveCycleClause, supportsStandardArrays, supportsTemporalLiteralOffset, supportsUnboundedLobLocatorMaterialization, translateExtractField, useConnectionToCreateLob, useInputStreamToInsertBlobMethods inherited from class Dialect
addUseIndexQueryHint, appendArrayLiteral, appendCheckConstraintOptions, appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, buildLockingClauseStrategy, buildOptimisticForceIncrementStrategy, buildOptimisticStrategy, buildPessimisticForceIncrementStrategy, buildPessimisticReadStrategy, buildPessimisticWriteStrategy, buildReadStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, buildStringToBooleanDecode, canCreateCatalog, canCreateSchema, canDisableConstraints, checkVersion, closeQuote, contribute, contributeFunctions, currentDate, determineDatabaseVersion, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCatalogSeparator, getCheckCondition, getCheckCondition, getCheckCondition, getCheckConstraintString, getColumnAliasExtractor, getColumnComment, getColumnDefaultString, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCrossReferenceParentTableFilter, getDefaultDecimalPrecision, getDefaultLobLength, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFloatPrecision, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getHqlTranslator, getIndexExporter, getKeywords, getLobMergeStrategy, getLockingStrategy, getLockingStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMultiKeyLoadSizingStrategy, getNativeIdentifierGeneratorStrategy, getNullColumnString, getNullColumnString, getNullOrdering, getParameterCountLimit, getPessimisticLockStyle, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getReadRowLockStrategy, getRowIdColumnString, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSetOperatorSqlString, getSizeStrategy, getSqmTranslatorFactory, getSupportedTemporaryTableKind, getTableCleaner, getTableComment, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTruncateTableStatements, getUniqueKeyExporter, getUserDefinedTypeExporter, getVersion, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, hasSelfReferentialForeignKeyBug, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, narrowCastType, openQuote, ordinal, prependComment, quote, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresColumnListInCreateView, requiresFloatCastingOfIntegerDivision, requiresNotNullBeforeDefault, requiresParensForTupleCounts, resolveSqlTypeCode, resolveSqlTypeLength, stripsTrailingSpacesFromChar, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBindingNullForSetObject, supportsBitType, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCrossJoin, supportsDuplicateSelectItemsInQueryGroup, supportsExceptAll, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsForUpdate, supportsFractionalTimestampArithmetic, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIntersect, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsLockTimeouts, supportsNamedColumnCheck, supportsNamedParameters, supportsNationalizedMethods, supportsNestedSubqueryCorrelation, supportsNoColumnsInsert, supportsNoWait, supportsNullPrecedence, supportsOrderByInSubquery, supportsOrdinalSelectItemReference, supportsOuterJoinForUpdate, supportsPredicateAsExpression, supportsRefCursors, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorSyntaxInInList, supportsSimpleQueryGrouping, supportsSkipLocked, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTableOptions, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsValuesListForInsert, supportsWait, supportsWithClause, throttleDdl, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useCrossReferenceForeignKeys, useFollowOnLocking, useMaterializedLobWhenCapacityExceeded
-
Field Details
-
MINIMUM_POSTGRES_VERSION
-
-
Constructor Details
-
SpannerPostgreSQLDialect
public SpannerPostgreSQLDialect() -
SpannerPostgreSQLDialect
-
SpannerPostgreSQLDialect
-
-
Method Details
-
initializeFunctionRegistry
Description copied from class:DialectInitialize the given registry with any dialect-specific functions.Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it.
These required functions include the functions defined by the JPA query language specification:
-
avg(arg)- aggregate function -
count([distinct ]arg)- aggregate function -
max(arg)- aggregate function -
min(arg)- aggregate function -
sum(arg)- aggregate function
-
coalesce(arg0, arg1, ...) -
nullif(arg0, arg1)
-
lower(arg) -
upper(arg) -
length(arg) -
concat(arg0, arg1, ...) -
locate(pattern, string[, start]) -
substring(string, start[, length]) -
trim([[spec ][character ]from] string)
-
abs(arg) -
mod(arg0, arg1) -
sqrt(arg)
-
current date -
current time -
current timestamp
-
any(arg)- aggregate function -
every(arg)- aggregate function
-
var_samp(arg)- aggregate function -
var_pop(arg)- aggregate function -
stddev_samp(arg)- aggregate function -
stddev_pop(arg)- aggregate function
-
cast(arg as Type) -
extract(field from arg)
-
ln(arg) -
exp(arg) -
power(arg0, arg1) -
floor(arg) -
ceiling(arg)
-
position(pattern in string) -
substring(string from start[ for length]) -
overlay(string placing replacement from start[ for length])
java.timetypes:-
local date -
local time -
local datetime -
offset datetime -
instant
-
left(string, length) -
right(string, length) -
replace(string, pattern, replacement) -
pad(string with length spec[ character]) -
repeat(string, times)
-
pi -
log10(arg) -
log(base, arg) -
sign(arg) -
sin(arg) -
cos(arg) -
tan(arg) -
asin(arg) -
acos(arg) -
atan(arg) -
atan2(arg0, arg1) -
round(arg0[, arg1]) -
truncate(arg0[, arg1]) -
sinh(arg) -
tanh(arg) -
cosh(arg) -
least(arg0, arg1, ...) -
greatest(arg0, arg1, ...) -
degrees(arg) -
radians(arg) -
bitand(arg1, arg1) -
bitor(arg1, arg1) -
bitxor(arg1, arg1)
-
format(datetime as pattern) -
collate(string as collation) -
str(arg)- synonym ofcast(a as String) -
ifnull(arg0, arg1)- synonym ofcoalesce(a, b)
-
ordinal(arg) -
string(arg)
extract(), and desugared by the parser:-
second(arg)- synonym ofextract(second from a) -
minute(arg)- synonym ofextract(minute from a) -
hour(arg)- synonym ofextract(hour from a) -
day(arg)- synonym ofextract(day from a) -
month(arg)- synonym ofextract(month from a) -
year(arg)- synonym ofextract(year from a)
second()function returns a floating point value, contrary to the integer type returned by the native function with this name on many databases. Thus, we don't just naively map these HQL functions to the native SQL functions with the same names.- Overrides:
initializeFunctionRegistryin classPostgreSQLDialect
-
-
registerJsonFunction
- Overrides:
registerJsonFunctionin classPostgreSQLDialect
-
registerArrayFunctions
- Overrides:
registerArrayFunctionsin classPostgreSQLDialect
-
registerXmlFunctions
- Overrides:
registerXmlFunctionsin classPostgreSQLDialect
-
registerUtilityFunctions
- Overrides:
registerUtilityFunctionsin classPostgreSQLDialect
-
initDefaultProperties
protected void initDefaultProperties()Description copied from class:DialectSet 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
Dialect.getDefaultStatementBatchSize(),Dialect.getDefaultNonContextualLobCreation(), andDialect.getDefaultUseGetGeneratedKeys().An implementation may set additional configuration properties, but this is discouraged.
- Overrides:
initDefaultPropertiesin classDialect
-
getArrayTypeName
public String getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) Description copied from class:DialectThe SQL type name for the array type with elements of the given type name.The ANSI-standard syntax is
integer array.- Overrides:
getArrayTypeNamein classDialect
-
getTableExporter
public org.hibernate.tool.schema.internal.StandardTableExporter getTableExporter()Description copied from class:Dialect- Overrides:
getTableExporterin classPostgreSQLDialect
-
getUniqueDelegate
Description copied from class:DialectGet theUniqueDelegatesupported by this dialect- Overrides:
getUniqueDelegatein classPostgreSQLDialect- Returns:
- The UniqueDelegate
-
getSequenceSupport
Description copied from class:DialectGet the appropriateSequenceSupportfor this dialect.- Overrides:
getSequenceSupportin classPostgreSQLDialect
-
getLimitHandler
Description copied from class:DialectObtain aLimitHandlerthat implements pagination support forQuery.setMaxResults(int)andQuery.setFirstResult(int).- Overrides:
getLimitHandlerin classPostgreSQLDialect
-
getCheckCondition
Description copied from class:DialectRender a SQL check condition for a column that represents an enumerated value by its string representation or a given list of values (with NULL value allowed).- Overrides:
getCheckConditionin classDialect- Returns:
- a SQL expression that will occur in a
checkconstraint
-
getCheckCondition
Description copied from class:DialectRender a SQL check condition for a column that represents an enumerated value by its ordinal representation or a given list of values.- Overrides:
getCheckConditionin classDialect- Returns:
- a SQL expression that will occur in a
checkconstraint
-
getCheckCondition
Description copied from class:DialectGenerate a SQLcheckcondition for the given column, constraining to the given values.- Overrides:
getCheckConditionin classDialect- Returns:
- a SQL expression that will occur in a
checkconstraint
-
getAggregateSupport
Description copied from class:DialectHow does this dialect support aggregate types likeSqlTypes.STRUCT.- Overrides:
getAggregateSupportin classPostgreSQLDialect
-
getLockingSupport
Description copied from class:DialectAccess to various details and operations related to this Dialect's support for pessimistic locking.- Overrides:
getLockingSupportin classPostgreSQLDialect
-
resolveSqlTypeCode
Description copied from class:DialectResolves theSqlTypestype code for the given column type name as reported by the database, ornullif it can't be resolved.- Overrides:
resolveSqlTypeCodein classPostgreSQLDialect
-
supportsFetchClause
Description copied from class:DialectDoes this dialect support the givenFETCHclause type.- Overrides:
supportsFetchClausein classPostgreSQLDialect- Parameters:
type- The fetch clause type- Returns:
trueif the underlying database supports the given fetch clause type,falseotherwise. The default isfalse.
-
getForUpdateString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire pessimistic UPGRADE locks for this dialect.- Overrides:
getForUpdateStringin classPostgreSQLDialect- Returns:
- The appropriate
FOR UPDATEclause string.
-
getForUpdateString
Description copied from class:DialectGet theFOR UPDATE OF column_listfragment appropriate for this dialect, given the aliases of the columns that are to be write-locked.- Overrides:
getForUpdateStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be write-locked.- Returns:
- The appropriate
FOR UPDATE OF column_listclause string.
-
getWriteLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire pessimistic WRITE locks for this dialect.Location of the returned string is treated the same as
Dialect.getForUpdateString().- Overrides:
getWriteLockStringin classPostgreSQLDialect- Parameters:
timeout- How long, in milliseconds, the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
-
getWriteLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire WRITE locks for this dialect, given the aliases of the columns to be WRITE locked.Location of the returned string is treated the same as
Dialect.getForUpdateString().- Overrides:
getWriteLockStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be read locked.timeout- How long, in milliseconds, the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
-
getWriteLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire pessimistic WRITE locks for this dialect.- Overrides:
getWriteLockStringin classPostgreSQLDialect- Parameters:
timeout- How long the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate lock clause.
-
getWriteLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire WRITE locks for this dialect, given the aliases of the 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
Dialect.getForUpdateString().- Overrides:
getWriteLockStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be read locked.timeout- How long the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
-
getReadLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire READ locks for this dialect.Location of the returned string is treated the same as
Dialect.getForUpdateString().- Overrides:
getReadLockStringin classPostgreSQLDialect- Parameters:
timeout- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate
LOCKclause string.
-
getReadLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire READ locks for this dialect.- Overrides:
getReadLockStringin classPostgreSQLDialect- Parameters:
timeout- How long the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
-
getReadLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire READ locks for this dialect, given the aliases of the columns to be read locked.- Overrides:
getReadLockStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be read locked.timeout- How long the database should wait to acquire the lock. See Timeouts for some "magic values".- Returns:
- The appropriate
LOCKclause string.
-
getReadLockString
Description copied from class:DialectGet the string to append toSELECTstatements to acquire READ locks for this dialect, given the aliases of the columns to be read locked.Location of the returned string is treated the same as
Dialect.getForUpdateString().- Overrides:
getReadLockStringin classPostgreSQLDialect- 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.
-
getForUpdateNowaitString
Description copied from class:DialectRetrieves theFOR UPDATE NOWAITsyntax specific to this dialect.- Overrides:
getForUpdateNowaitStringin classPostgreSQLDialect- Returns:
- The appropriate
FOR UPDATE NOWAITclause string.
-
getForUpdateNowaitString
Description copied from class:DialectGet theFOR UPDATE OF column_list NOWAITfragment appropriate for this dialect, given the aliases of the columns to be write locked.- Overrides:
getForUpdateNowaitStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be write locked.- Returns:
- The appropriate
FOR UPDATE OF colunm_list NOWAITclause string.
-
getForUpdateSkipLockedString
Description copied from class:DialectRetrieves theFOR UPDATE SKIP LOCKEDsyntax specific to this dialect.- Overrides:
getForUpdateSkipLockedStringin classPostgreSQLDialect- Returns:
- The appropriate
FOR UPDATE SKIP LOCKEDclause string.
-
getForUpdateSkipLockedString
Description copied from class:DialectGet theFOR UPDATE OF column_list SKIP LOCKEDfragment appropriate for this dialect, given the aliases of the columns to be write-locked.- Overrides:
getForUpdateSkipLockedStringin classPostgreSQLDialect- Parameters:
aliases- The columns to be write-locked.- Returns:
- The appropriate
FOR UPDATE colunm_list SKIP LOCKEDclause string.
-
getLockingClauseStrategy
Description copied from class:DialectStrategy for handling locking clause as part of SqlAstTranslator.- Overrides:
getLockingClauseStrategyin classDialect
-
contributeTypes
Description copied from class:DialectA callback which allows theDialectto contribute types.- Overrides:
contributeTypesin classPostgreSQLDialect- Parameters:
typeContributions- Callback to contribute the typesserviceRegistry- The service registry
-
getFunctionalDependencyAnalysisSupport
Description copied from class:DialectGet this dialect's level of support for primary key functional dependency analysis withinGROUP BYandORDER BYclauses.- Overrides:
getFunctionalDependencyAnalysisSupportin classPostgreSQLDialect
-
contributePostgreSQLTypes
protected void contributePostgreSQLTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Description copied from class:PostgreSQLDialectAllow for extension points to override this only- Overrides:
contributePostgreSQLTypesin classPostgreSQLDialect
-
getSqlAstTranslatorFactory
Description copied from class:Dialect- Overrides:
getSqlAstTranslatorFactoryin classPostgreSQLDialect- See Also:
-
registerPostgreSQLColumnTypes
protected void registerPostgreSQLColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) - Overrides:
registerPostgreSQLColumnTypesin classPostgreSQLDialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenjava.timevalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenDatevalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
appendDateTimeLiteral
public void appendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal representing the givenCalendarvalue to the givenSqlAppender.- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
castType
Description copied from class:DialectThe SQL type to use incast( ... as ... )expressions when casting to the target type represented by the given JDBC type code.- Overrides:
castTypein classPostgreSQLDialect- Parameters:
sqlTypeCode- The JDBC type code representing the target type- Returns:
- The SQL type to use in
cast()
-
timestampaddPattern
public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Description copied from class:DialectObtain a pattern for the SQL equivalent to atimestampadd()function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampaddPatternin classPostgreSQLDialect- Parameters:
unit- The unit to add to the temporaltemporalType- The type of the temporalintervalType- The type of interval to add or null if it's not a native interval
-
timestampdiffPattern
public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Description copied from class:DialectObtain a pattern for the SQL equivalent to atimestampdiff()function call. The resulting pattern must contain ?1, ?2, and ?3 placeholders for the arguments.- Overrides:
timestampdiffPatternin classPostgreSQLDialect- Parameters:
unit- the first argumentfromTemporalType- true if the first argument is a timestamp, false if a datetoTemporalType- true if the second argument is
-
castPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to acast()function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.- Overrides:
castPatternin classPostgreSQLDialect- Parameters:
from- aCastTypeindicating the type of the value argumentto- aCastTypeindicating the type the value argument is cast to
-
columnType
Description copied from class:DialectThe database column type name for a given JDBC type code defined inTypesorSqlTypes. This default implementation returns the ANSI-standard type name.This method may be overridden by concrete
Dialects as an alternative toDialect.registerColumnTypes(TypeContributions, ServiceRegistry)for simple registrations.Note that:
- Implementations of this method are expected to define a
sensible mapping for
Types.NCLOBTypes.NCHAR, andTypes.NVARCHAR. On some database, these types are simply remapped toCLOB,CHAR, andVARCHAR. - Mappings for
Types.TIMESTAMPandTypes.TIMESTAMP_WITH_TIMEZONEshould support explicit specification of precision if possible. - As specified by
DdlTypeRegistry.getDescriptor(int), this method never receivesTypes.LONGVARCHAR,Types.LONGNVARCHAR, norTypes.LONGVARBINARY, which are considered synonyms for their non-LONGcounterparts. - On the other hand, the types
SqlTypes.LONG32VARCHAR,SqlTypes.LONG32NVARCHAR, andSqlTypes.LONG32VARBINARYare not synonyms, and implementations of this method must define sensible mappings, for example to database-nativeTEXTorCLOBtypes.
- Overrides:
columnTypein classPostgreSQLDialect- Parameters:
sqlTypeCode- a SQLtype code- Returns:
- a column type name, with
$l,$p,$splaceholders for length, precision, scale - See Also:
- Implementations of this method are expected to define a
sensible mapping for
-
defaultScrollMode
Description copied from class:DialectA defaultScrollModeto be used byQuery.scroll().- Overrides:
defaultScrollModein classDialect- Returns:
- the default
ScrollModeto use.
-
supportsTupleCounts
public boolean supportsTupleCounts()Description copied from class:DialectDoes this dialect supportcount(a,b)?- Overrides:
supportsTupleCountsin classPostgreSQLDialect- Returns:
- True if the database supports counting tuples; false otherwise.
-
supportsUserDefinedTypes
public boolean supportsUserDefinedTypes()Description copied from class:DialectDoes the database support user-defined types?- Overrides:
supportsUserDefinedTypesin classPostgreSQLDialect- See Also:
-
supportsFilterClause
public boolean supportsFilterClause()Description copied from class:DialectWhether the FILTER clause for aggregate functions is supported.- Overrides:
supportsFilterClausein classPostgreSQLDialect
-
supportsRecursiveCycleUsingClause
public boolean supportsRecursiveCycleUsingClause()Description copied from class:DialectWhether the SQL cycle clause supports the using sub-clause.- Overrides:
supportsRecursiveCycleUsingClausein classPostgreSQLDialect
-
supportsRecursiveSearchClause
public boolean supportsRecursiveSearchClause()Description copied from class:DialectWhether the SQL search clause is supported, which can be used for recursive CTEs.- Overrides:
supportsRecursiveSearchClausein classPostgreSQLDialect
-
supportsUniqueConstraints
public boolean supportsUniqueConstraints()- Overrides:
supportsUniqueConstraintsin classDialect- Returns:
- True if database supports
UNIQUEconstraint definitions in thecreate tableandalter tablestatements. If this is not supported, then Hibernate will create a unique index instead.
-
supportsRowValueConstructorGtLtSyntax
public boolean supportsRowValueConstructorGtLtSyntax()Description copied from class:DialectIs this dialect known to support what ANSI SQL calls the row value constructor syntax with the<>,<=and>=operators.That is, does it support comparisons like:
(FIRST_NAME, LAST_NAME) < ('Steve', 'Ebersole')- Overrides:
supportsRowValueConstructorGtLtSyntaxin classDialect- Returns:
- True if this SQL dialect is known to support the use of row value constructors as operands of relational comparison operators; false otherwise.
-
supportsRowValueConstructorSyntax
public boolean supportsRowValueConstructorSyntax()Description copied from class:DialectIs this dialect known to support what ANSI SQL calls the row value constructor syntax, sometimes called "tuples".That is, does it support comparisons like:
(FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole')- Overrides:
supportsRowValueConstructorSyntaxin classDialect- Returns:
- True if this SQL dialect is known to support the use of row value constructors as operands of the equality operator; false otherwise.
-
supportsRowValueConstructorSyntaxInQuantifiedPredicates
public boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()Description copied from class:DialectIs this dialect known to support what ANSI SQL calls the row value constructor syntax with quantified predicates.That is, does it support comparisons like:
(FIRST_NAME, LAST_NAME) = ALL (select ...)
- Overrides:
supportsRowValueConstructorSyntaxInQuantifiedPredicatesin classDialect- Returns:
- True if this SQL dialect is known to support the use of row value constructors as operands with quantified predicates; false otherwise.
-
supportsValuesList
public boolean supportsValuesList()Description copied from class:DialectDoes this dialect supportvalueslists of formVALUES (1), (2), (3)?- Overrides:
supportsValuesListin classPostgreSQLDialect- Returns:
trueifvalueslist are supported
-
supportsRowValueConstructorSyntaxInInSubQuery
public boolean supportsRowValueConstructorSyntaxInInSubQuery()Description copied from class:DialectIf the dialect supports row value constructors, does it allow them inINsubqueries?For example:
(FIRST_NAME, LAST_NAME) IN (SELECT ... )
- Overrides:
supportsRowValueConstructorSyntaxInInSubQueryin classDialect- Returns:
- True if this SQL dialect is known to support the
use of row value constructors in
INsubqueries; false otherwise.
-
supportsCaseInsensitiveLike
public boolean supportsCaseInsensitiveLike()Description copied from class:DialectDoes this dialect support case-insensitiveLIKEcomparisons?- Overrides:
supportsCaseInsensitiveLikein classPostgreSQLDialect- Returns:
trueif the database supports case-insensitive like comparisons,falseotherwise. The default isfalse.
-
currentTimestamp
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timestampfunction, which maps to the Java typeTimestampwhich is a datetime with no time zone. This contradicts ANSI SQL wherecurrent_timestamphas the typeTIMESTAMP WITH TIME ZONE.It is recommended to override this in dialects for databases which support
localtimestamportimestamp at local.- Overrides:
currentTimestampin classPostgreSQLDialect
-
currentTime
Description copied from class:DialectTranslation of the HQL/JPQLcurrent_timefunction, which maps to the Java typeTimewhich is a time with no time zone. This contradicts ANSI SQL wherecurrent_timehas the typeTIME WITH TIME ZONE.It is recommended to override this in dialects for databases which support
localtimeortime at local.- Overrides:
currentTimein classPostgreSQLDialect
-
currentLocalTimestamp
Description copied from class:DialectTranslation of the HQLlocal_datetimefunction, which maps to the Java typeLocalDateTimewhich is a datetime with no time zone. It should usually be the same SQL function as forDialect.currentTimestamp().It is recommended to override this in dialects for databases which support
localtimestamporcurrent_timestamp at local.- Overrides:
currentLocalTimestampin classDialect
-
currentLocalTime
Description copied from class:DialectTranslation of the HQLlocal_timefunction, which maps to the Java typeLocalTimewhich is a time with no time zone. It should usually be the same SQL function as forDialect.currentTime().It is recommended to override this in dialects for databases which support
localtimeorcurrent_time at local.- Overrides:
currentLocalTimein classDialect
-
supportsLateral
public boolean supportsLateral()Description copied from class:DialectDoes this dialect support the SQLlateralkeyword or a proprietary alternative?- Overrides:
supportsLateralin classPostgreSQLDialect- Returns:
trueif the underlying database supports lateral,falseotherwise. The default isfalse.
-
supportsFromClauseInUpdate
public boolean supportsFromClauseInUpdate()Description copied from class:DialectDoes this dialect support thefromclause for update statements?- Overrides:
supportsFromClauseInUpdatein classPostgreSQLDialect- Returns:
trueiffromclause is supported
-
getMaxVarcharLength
public int getMaxVarcharLength()Description copied from class:DialectThe biggest size value that can be supplied as argument to aTypes.VARCHAR-like type.For longer column lengths, use some sort of
text-like type for the column.- Overrides:
getMaxVarcharLengthin classPostgreSQLDialect
-
getMaxVarbinaryLength
public int getMaxVarbinaryLength()Description copied from class:DialectThe biggest size value that can be supplied as argument to aTypes.VARBINARY-like type.For longer column lengths, use some sort of
image-like type for the column.- Overrides:
getMaxVarbinaryLengthin classPostgreSQLDialect
-
getCurrentSchemaCommand
Description copied from class:DialectGet the SQL command used to retrieve the current schema name.Works in conjunction with
Dialect.getSchemaNameResolver(), unless the resultingSchemaNameResolverdoes not need this information. For example, a custom implementation might make use of the Java 1.7Connection.getSchema()method.- Overrides:
getCurrentSchemaCommandin classPostgreSQLDialect- Returns:
- The current schema retrieval SQL
-
supportsCommentOn
public boolean supportsCommentOn()Description copied from class:DialectDoes this dialect support commenting on tables and columns?- Overrides:
supportsCommentOnin classPostgreSQLDialect- Returns:
trueif commenting is supported
-
supportsWindowFunctions
public boolean supportsWindowFunctions()Description copied from class:DialectDoes this dialect support window functions likerow_number() over (..)?- Overrides:
supportsWindowFunctionsin classPostgreSQLDialect- Returns:
trueif the underlying database supports window functions,falseotherwise. The default isfalse.
-
getInExpressionCountLimit
public int getInExpressionCountLimit()Description copied from class:DialectReturn the limit that the underlying database places on the number of elements in anINpredicate. If the database defines no such limits, simply return zero or a number smaller than zero.- Overrides:
getInExpressionCountLimitin classDialect- Returns:
- The limit, or a non-positive integer to indicate no limit.
-
getAddForeignKeyConstraintString
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey) Description copied from class:DialectThe syntax used to add a foreign key constraint to a table, with the referenced key columns explicitly specified.- Overrides:
getAddForeignKeyConstraintStringin classDialect- 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
-
canBatchTruncate
public boolean canBatchTruncate()Description copied from class:DialectDoes thetruncate tablestatement accept multiple tables?- Overrides:
canBatchTruncatein classPostgreSQLDialect- Returns:
true, but only because we can "batch" truncate
-
rowId
Description copied from class:DialectThe name of arowid-like pseudo-column which acts as a high-performance row locator, or null if this dialect has no such pseudo-column.If the
rowid-like value is an explicitly declared named column instead of an implicit pseudo-column, and if the given name is nonempty, return the given name.- Overrides:
rowIdin classPostgreSQLDialect- Parameters:
rowId- the name specified byRowId.value(), which is ignored ifDialect.getRowIdColumnString(String)is not overridden
-
supportsRowConstructor
public boolean supportsRowConstructor()Description copied from class:DialectWhether the SQL row constructor is supported.- Overrides:
supportsRowConstructorin classPostgreSQLDialect
-
getTruncateTableStatement
Description copied from class:DialectA SQL statement that truncates the given table.- Overrides:
getTruncateTableStatementin classDialect- Parameters:
tableName- the name of the table
-
getBeforeDropStatement
Description copied from class:DialectA command to execute before dropping tables.- Overrides:
getBeforeDropStatementin classPostgreSQLDialect- Returns:
- A SQL statement, or
null
-
getCascadeConstraintsString
Description copied from class:DialectThe keyword that specifies that adrop tableoperation should be cascaded to its constraints, typically" cascade"where the leading space is required, or the empty string if there is no such keyword in this dialect.- Overrides:
getCascadeConstraintsStringin classPostgreSQLDialect- Returns:
- The cascade drop keyword, if any, with a leading space
-
supportsIfExistsBeforeConstraintName
public boolean supportsIfExistsBeforeConstraintName()Description copied from class:DialectFor dropping a constraint with analter tablestatement, can the phraseif existsbe applied before the constraint name?- Overrides:
supportsIfExistsBeforeConstraintNamein classPostgreSQLDialect- Returns:
trueifif existscan be applied before the constraint name
-
supportsIfExistsAfterAlterTable
public boolean supportsIfExistsAfterAlterTable()Description copied from class:DialectFor analter table, can the phraseif existsbe applied?- Overrides:
supportsIfExistsAfterAlterTablein classPostgreSQLDialect- Returns:
trueifif existscan be applied afteralter table
-
supportsDistinctFromPredicate
public boolean supportsDistinctFromPredicate()Description copied from class:DialectDoes this dialect support some kind ofdistinct frompredicate?That is, does it support syntax like:
... where FIRST_NAME IS DISTINCT FROM LAST_NAME
- Overrides:
supportsDistinctFromPredicatein classPostgreSQLDialect- Returns:
- True if this SQL dialect is known to support some kind of
distinct frompredicate; false otherwise
-
supportsPartitionBy
public boolean supportsPartitionBy()Description copied from class:DialectDoes is dialect supportpartition byin window functions?- Overrides:
supportsPartitionByin classPostgreSQLDialect
-
addPartitionKeyToPrimaryKey
public boolean addPartitionKeyToPrimaryKey()Description copied from class:DialectDoes this dialect require that the columns listed inpartition byalso occur in the primary key, when defining table partitioning?- Overrides:
addPartitionKeyToPrimaryKeyin classPostgreSQLDialect
-
getDual
-
getFromDualForSelectOnly
- Overrides:
getFromDualForSelectOnlyin classDialect
-
datetimeFormat
- Overrides:
datetimeFormatin classPostgreSQLDialect
-
supportsRecursiveCTE
public boolean supportsRecursiveCTE()Description copied from class:DialectDoes this dialect/database support recursive CTEs?- Overrides:
supportsRecursiveCTEin classPostgreSQLDialect- Returns:
trueif recursive CTEs are supported
-
supportsWithClauseInSubquery
public boolean supportsWithClauseInSubquery()Description copied from class:DialectWhether the SQL with clause is supported within a subquery.- Overrides:
supportsWithClauseInSubqueryin classDialect
-
supportsNestedWithClause
public boolean supportsNestedWithClause()Description copied from class:DialectWhether the SQL with clause is supported within a CTE.- Overrides:
supportsNestedWithClausein classDialect
-
supportsCteHeaderColumnList
public boolean supportsCteHeaderColumnList()Description copied from class:DialectDoes this dialect support defining the column list in the CTE header?Standard syntax:
WITH cte (col1, col2) AS ...If false, Hibernate will generate:
WITH cte AS (SELECT ... AS col1, ... AS col2)- Overrides:
supportsCteHeaderColumnListin classDialect- Returns:
trueif the dialect supports the column list in the CTE header;falseotherwise.
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()Description copied from class:DialectDoes this dialect supportcount(distinct a,b)?- Overrides:
supportsTupleDistinctCountsin classDialect- Returns:
- True if the database supports counting distinct tuples; false otherwise.
-
getInformationExtractor
Description copied from class:DialectAInformationExtractorwhich is able to extract table, primary key, foreign key, index information etc. via JDBC.- Overrides:
getInformationExtractorin classPostgreSQLDialect
-
getFallbackSqmMutationStrategy
public SqmMultiTableMutationStrategy getFallbackSqmMutationStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext) Description copied from class:DialectTheSqmMultiTableMutationStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableMutationStrategy().- Overrides:
getFallbackSqmMutationStrategyin classPostgreSQLDialect- See Also:
-
getFallbackSqmInsertStrategy
public SqmMultiTableInsertStrategy getFallbackSqmInsertStrategy(EntityMappingType rootEntityDescriptor, RuntimeModelCreationContext runtimeModelCreationContext) Description copied from class:DialectTheSqmMultiTableInsertStrategyto use when not specified byQueryEngineOptions.getCustomSqmMultiTableInsertStrategy().- Overrides:
getFallbackSqmInsertStrategyin classPostgreSQLDialect- See Also:
-
getLocalTemporaryTableStrategy
Description copied from class:DialectThe strategy to use for local temporary tables.- Overrides:
getLocalTemporaryTableStrategyin classPostgreSQLDialect
-
getGlobalTemporaryTableStrategy
Description copied from class:DialectThe strategy to use for global temporary tables.- Overrides:
getGlobalTemporaryTableStrategyin classDialect
-
getPersistentTemporaryTableStrategy
Description copied from class:DialectThe strategy to use for persistent temporary tables.- Overrides:
getPersistentTemporaryTableStrategyin classDialect
-
buildSQLExceptionConversionDelegate
Description copied from class:DialectAn instance ofSQLExceptionConversionDelegatefor interpreting dialect-specific error or SQLState codes.If this method is overridden to return a non-null value, the default
SQLExceptionConverterwill use the returnedSQLExceptionConversionDelegatein addition to the following standard delegates:- a "static" delegate based on the JDBC4-defined
SQLExceptionhierarchy, and - a delegate that interprets SQLState codes as either X/Open or SQL-2003 codes, depending on what is reported by the JDBC driver.
It is strongly recommended that every
Dialectimplementation override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific error code, rather than on the SQLState.- Overrides:
buildSQLExceptionConversionDelegatein classPostgreSQLDialect- Returns:
- The
SQLExceptionConversionDelegatefor this dialect
- a "static" delegate based on the JDBC4-defined
-
getCallableStatementSupport
Description copied from class:DialectTheCallableStatementSupportfor this database. Does this database support returning cursors?- Overrides:
getCallableStatementSupportin classPostgreSQLDialect
-
useIntegerForPrimaryKey
public boolean useIntegerForPrimaryKey() -
createOptionalTableUpdateOperation
public MutationOperation createOptionalTableUpdateOperation(EntityMutationTarget mutationTarget, org.hibernate.sql.model.internal.OptionalTableUpdate optionalTableUpdate, SessionFactoryImplementor factory) Description copied from class:DialectCreate aMutationOperationfor a updating an optional table- Overrides:
createOptionalTableUpdateOperationin classPostgreSQLDialect
-