public class MySQL56SpatialDialect extends org.hibernate.dialect.MySQL55Dialect implements SpatialDialect
Extends the MySQL5Dialect by including support for the spatial operators. <p> This <code>SpatialDialect</code> 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.
Constructor and Description |
---|
MySQL56SpatialDialect()
Constructs the dialect
|
Modifier and Type | Method and Description |
---|---|
void |
contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions,
org.hibernate.service.ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
|
String |
getDWithinSQL(String columnName)
Returns The SQL fragment when parsing a <code>DWithinExpression</code>.
|
String |
getHavingSridSQL(String columnName)
Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
String |
getIsEmptySQL(String columnName,
boolean isEmpty)
Returns the SQL fragment when parsing a <code>IsEmptyExpression</code> or
<code>IsNotEmpty</code> 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
<code>org.hibernate.spatial.criterion.SpatialFilterExpression</code>s
into prepared statements.
|
String |
getSpatialRelateSQL(String columnName,
int spatialRelation)
Returns the SQL fragment for the SQL WHERE-clause when parsing
<code>org.hibernatespatial.criterion.SpatialRelateExpression</code>s
into prepared statements.
|
String |
getTypeName(int code,
long length,
int precision,
int scale) |
org.hibernate.type.descriptor.sql.SqlTypeDescriptor |
remapSqlTypeDescriptor(org.hibernate.type.descriptor.sql.SqlTypeDescriptor sqlTypeDescriptor) |
boolean |
supports(SpatialFunction function)
Does this dialect supports the specified <code>SpatialFunction</code>.
|
boolean |
supportsFiltering()
Returns true if this <code>SpatialDialect</code> supports a specific filtering function.
|
getEngineKeyword, getQueryHintString, getViolatedConstraintNameExtracter, registerVarcharTypes, supportsColumnCheck
areStringComparisonsCaseInsensitive, buildSQLExceptionConversionDelegate, canCreateCatalog, canCreateSchema, closeQuote, dropConstraints, escapeLiteral, fixedPointNumberCastTarget, floatingPointNumberCastTarget, getAddColumnString, getAddForeignKeyConstraintString, getCastTypeName, getColumnComment, getCreateCatalogCommand, getCreateSchemaCommand, getCurrentTimestampSelectString, getDefaultMultiTableBulkIdStrategy, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getForUpdateString, getIdentityColumnSupport, getLimitHandler, getLimitString, getNotExpression, getReadLockString, getResultSet, getSelectGUIDString, getTableComment, getTableTypeString, getUniqueDelegate, getWriteLockString, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, openQuote, qualifyIndexName, registerResultSetOutParameter, renderOrderByElement, smallIntegerCastTarget, supportsCascadeDelete, supportsCurrentTimestampSelection, supportsEmptyInList, supportsIfExistsBeforeTableName, supportsLimit, supportsLobValueChangePropogation, supportsLockTimeouts, supportsRowValueConstructorSyntax, supportsSubqueryOnMutatingTable
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, cast, cast, cast, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getColumnAliasExtractor, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQuerySequencesString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableExporter, getTypeName, getUniqueKeyExporter, getWriteLockString, 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, supportsLimitOffset, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSequences, supportsSkipLocked, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
public org.hibernate.type.descriptor.sql.SqlTypeDescriptor remapSqlTypeDescriptor(org.hibernate.type.descriptor.sql.SqlTypeDescriptor sqlTypeDescriptor)
remapSqlTypeDescriptor
in class org.hibernate.dialect.Dialect
public String getTypeName(int code, long length, int precision, int scale) throws org.hibernate.HibernateException
getTypeName
in class org.hibernate.dialect.Dialect
org.hibernate.HibernateException
public void contributeTypes(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry)
Allows the Dialect to contribute additional types
contributeTypes
in class org.hibernate.dialect.Dialect
typeContributions
- Callback to contribute the typesserviceRegistry
- The service registrypublic String getSpatialRelateSQL(String columnName, int spatialRelation)
SpatialDialect
Returns the SQL fragment for the SQL WHERE-clause when parsing <code>org.hibernatespatial.criterion.SpatialRelateExpression</code>s into prepared statements. <p/>
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
<code>SpatialRelation</code>).SpatialRelateExpression
public String getSpatialFilterExpression(String columnName)
SpatialDialect
Returns the SQL fragment for the SQL WHERE-expression when parsing <code>org.hibernate.spatial.criterion.SpatialFilterExpression</code>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
Returns the SQL fragment for the specfied Spatial aggregate expression.
getSpatialAggregateSQL
in interface SpatialDialect
columnName
- The name of the Geometry propertyaggregation
- The type of <code>SpatialAggregate</code>public String getDWithinSQL(String columnName)
SpatialDialect
Returns The SQL fragment when parsing a <code>DWithinExpression</code>.
getDWithinSQL
in interface SpatialDialect
columnName
- The geometry column to test againstpublic String getHavingSridSQL(String columnName)
SpatialDialect
Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
getHavingSridSQL
in interface SpatialDialect
columnName
- The geometry column to test againstpublic String getIsEmptySQL(String columnName, boolean isEmpty)
SpatialDialect
Returns the SQL fragment when parsing a <code>IsEmptyExpression</code> or <code>IsNotEmpty</code> expression.
getIsEmptySQL
in interface SpatialDialect
columnName
- The geometry columnisEmpty
- Whether the geometry is tested for empty or non-emptypublic boolean supportsFiltering()
SpatialDialect
Returns true if this <code>SpatialDialect</code> supports a specific filtering function. <p> This is intended to signal DB-support for fast window queries, or MBR-overlap queries.</p>
supportsFiltering
in interface SpatialDialect
public boolean supports(SpatialFunction function)
SpatialDialect
Does this dialect supports the specified <code>SpatialFunction</code>.
supports
in interface SpatialDialect
function
- <code>SpatialFunction</code>Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.