public class MySQL8SpatialDialect extends MySQL8Dialect implements SpatialDialect
ESCAPE_PATTERN_REPLACEMENT
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TWO_SINGLE_QUOTES_REPLACEMENT
Constructor and Description |
---|
MySQL8SpatialDialect()
Constructs an instance
|
Modifier and Type | Method and Description |
---|---|
void |
contributeTypes(TypeContributions typeContributions,
ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
|
String |
getDWithinSQL(String columnName)
Returns The SQL fragment when parsing a
DWithinExpression . |
String |
getHavingSridSQL(String columnName)
Returns the SQL fragment when parsing a
HavingSridExpression . |
String |
getIsEmptySQL(String columnName,
boolean isEmpty)
Returns the SQL fragment when parsing a
IsEmptyExpression or
IsNotEmpty expression. |
String |
getSpatialAggregateSQL(String columnName,
int aggregation)
Returns the SQL fragment for the specfied Spatial aggregate expression.
|
String |
getSpatialFilterExpression(String columnName)
Returns the SQL fragment for the SQL WHERE-expression when parsing
org.hibernate.spatial.criterion.SpatialFilterExpression s
into prepared statements. |
String |
getSpatialRelateSQL(String columnName,
int spatialRelation)
Returns the SQL fragment for the SQL WHERE-clause when parsing
org.hibernatespatial.criterion.SpatialRelateExpression s
into prepared statements. |
String |
getTypeName(int code,
long length,
int precision,
int scale)
Get the name of the database type associated with the given
Types typecode with the given storage specification
parameters. |
SqlTypeDescriptor |
remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)
Allows the dialect to override a
SqlTypeDescriptor . |
boolean |
supports(SpatialFunction function)
Does this dialect supports the specified
SpatialFunction . |
boolean |
supportsFiltering()
Returns true if this
SpatialDialect supports a specific filtering function. |
getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getReadLockString, getReadLockString, getWriteLockString, getWriteLockString, supportsNoWait, supportsSkipLocked
supportsRowValueConstructorSyntaxInInList
getDefaultMySQLStorageEngine
getEngineKeyword, getQueryHintString, getViolatedConstraintNameExtracter, registerVarcharTypes, supportsColumnCheck, supportsUnionAll
areStringComparisonsCaseInsensitive, buildIdentifierHelper, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, closeQuote, dropConstraints, escapeLiteral, fixedPointNumberCastTarget, floatingPointNumberCastTarget, getAddColumnString, getAddForeignKeyConstraintString, getCastTypeName, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCurrentTimestampSelectString, getDefaultMultiTableBulkIdStrategy, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getForUpdateString, getIdentityColumnSupport, getLimitHandler, getLimitString, getNotExpression, getResultSet, getSelectGUIDString, getTableComment, getTableTypeString, getUniqueDelegate, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, openQuote, qualifyIndexName, registerResultSetOutParameter, renderOrderByElement, smallIntegerCastTarget, supportsCascadeDelete, supportsCurrentTimestampSelection, supportsEmptyInList, supportsIfExistsBeforeTableName, supportsLimit, supportsLobValueChangePropogation, supportsLockTimeouts, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSubqueryOnMutatingTable
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, cast, cast, cast, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, equivalentTypes, escapeComment, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQuerySequencesString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableExporter, getTypeName, getUniqueKeyExporter, hasAlterTable, inlineLiteral, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
Dialect
contributeTypes
in class Dialect
typeContributions
- Callback to contribute the typesserviceRegistry
- The service registrypublic String getSpatialRelateSQL(String columnName, int spatialRelation)
SpatialDialect
org.hibernatespatial.criterion.SpatialRelateExpression
s
into prepared statements.
getSpatialRelateSQL
in interface SpatialDialect
columnName
- The name of the geometry-typed column to which the relation is
appliedspatialRelation
- The type of spatial relation (as defined in
SpatialRelation
).SpatialRelateExpression
public String getTypeName(int code, long length, int precision, int scale) throws HibernateException
Dialect
Types
typecode with the given storage specification
parameters.getTypeName
in class Dialect
code
- The Types
typecodelength
- The datatype lengthprecision
- The datatype precisionscale
- The datatype scaleHibernateException
- If no mapping was specified for that type.public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor)
Dialect
SqlTypeDescriptor
.
If the passed sqlTypeDescriptor
allows itself to be remapped (per
SqlTypeDescriptor.canBeRemapped()
), then this method uses
Dialect.getSqlTypeDescriptorOverride(int)
to get an optional override based on the SQL code returned by
SqlTypeDescriptor.getSqlType()
.
If this dialect does not provide an override or if the sqlTypeDescriptor
does not allow itself to be
remapped, then this method simply returns the original passed sqlTypeDescriptor
remapSqlTypeDescriptor
in class Dialect
sqlTypeDescriptor
- The SqlTypeDescriptor
to overrideSqlTypeDescriptor
that should be used for this dialect;
if there is no override, then original sqlTypeDescriptor
is returned.Dialect.getSqlTypeDescriptorOverride(int)
public String getSpatialFilterExpression(String columnName)
SpatialDialect
org.hibernate.spatial.criterion.SpatialFilterExpression
s
into prepared statements.getSpatialFilterExpression
in interface SpatialDialect
columnName
- The name of the geometry-typed column to which the filter is
be appliedSpatialFilterExpression
public String getSpatialAggregateSQL(String columnName, int aggregation)
SpatialDialect
getSpatialAggregateSQL
in interface SpatialDialect
columnName
- The name of the Geometry propertyaggregation
- The type of SpatialAggregate
public String getDWithinSQL(String columnName)
SpatialDialect
DWithinExpression
.getDWithinSQL
in interface SpatialDialect
columnName
- The geometry column to test againstDWithinExpression
.public String getHavingSridSQL(String columnName)
SpatialDialect
HavingSridExpression
.getHavingSridSQL
in interface SpatialDialect
columnName
- The geometry column to test againstHavingSridExpression
.public String getIsEmptySQL(String columnName, boolean isEmpty)
SpatialDialect
IsEmptyExpression
or
IsNotEmpty
expression.getIsEmptySQL
in interface SpatialDialect
columnName
- The geometry columnisEmpty
- Whether the geometry is tested for empty or non-emptypublic boolean supportsFiltering()
SpatialDialect
SpatialDialect
supports a specific filtering function.
This is intended to signal DB-support for fast window queries, or MBR-overlap queries.
supportsFiltering
in interface SpatialDialect
public boolean supports(SpatialFunction function)
SpatialDialect
SpatialFunction
.supports
in interface SpatialDialect
function
- SpatialFunction
SpatialDialect
supports the spatial function specified by the function parameter.Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.