public class MySQL56SpatialDialect extends MySQL5Dialect implements SpatialDialect
SpatialDialect
uses the ST_* spatial operators that operate on exact geometries which have been
added in MySQL version 5.6.1. Previous versions of MySQL only supported operators that operated on Minimum Bounding
Rectangles (MBR's). This dialect my therefore produce different results than the other MySQL spatial dialects.CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STREAM_XFER_LOB_MERGE_STRATEGY
Constructor and Description |
---|
MySQL56SpatialDialect()
Constructs the dialect
|
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 an
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. |
getViolatedConstraintNameExtracter, registerVarcharTypes, supportsColumnCheck
areStringComparisonsCaseInsensitive, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, closeQuote, fixedPointNumberCastTarget, floatingPointNumberCastTarget, getAddColumnString, getAddForeignKeyConstraintString, getCastTypeName, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCurrentTimestampSelectString, getDefaultMultiTableBulkIdStrategy, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getForUpdateString, getIdentityColumnString, getIdentitySelectString, getLimitHandler, getLimitString, getNotExpression, getReadLockString, getResultSet, getSelectGUIDString, getTableComment, getWriteLockString, isCurrentTimestampSelectStringCallable, openQuote, qualifyIndexName, registerResultSetOutParameter, renderOrderByElement, smallIntegerCastTarget, supportsCascadeDelete, supportsCurrentTimestampSelection, supportsEmptyInList, supportsIdentityColumns, supportsIfExistsBeforeTableName, supportsLimit, supportsLobValueChangePropogation, supportsLockTimeouts, supportsRowValueConstructorSyntax, supportsSubqueryOnMutatingTable
appendIdentitySelectToInsert, appendLockHint, appendLockHint, applyLocksToSql, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, cast, cast, cast, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, dropConstraints, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnSupport, getIdentityInsertString, getIdentitySelectString, 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, getTableTypeString, getTypeName, getUniqueDelegate, getUniqueKeyExporter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isLockTimeoutParameterized, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsCommentOn, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNamedParameters, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
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
doe 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 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 void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry)
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 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-2017 Red Hat, Inc. All Rights Reserved.