public class MBTilesDialect extends SQLDialect
BASE_DBMS_CAPABILITIES, dataStore, LOGGER
Modifier | Constructor and Description |
---|---|
protected |
MBTilesDialect(JDBCDataStore dataStore) |
Modifier and Type | Method and Description |
---|---|
Envelope |
decodeGeometryEnvelope(ResultSet rs,
int column,
Connection cx)
Decodes the result of a spatial extent function in a SELECT statement.
|
Geometry |
decodeGeometryValue(GeometryDescriptor descriptor,
ResultSet rs,
String column,
GeometryFactory factory,
Connection cx,
Hints hints)
Decodes a geometry value from the result of a query.
|
void |
encodeGeometryEnvelope(String tableName,
String geometryColumn,
StringBuffer sql)
Encodes the spatial extent function of a geometry column in a SELECT statement.
|
void |
initializeConnection(Connection cx)
Initializes a newly created database connection.
|
addSupportedHints, applyLimitOffset, createCRS, createIndex, decodeGeometryValue, dropIndex, encodeAggregateFunction, encodeAggregateFunctionPostfix, encodeAggregateFunctionPrefix, encodeColumnAlias, encodeColumnName, encodeColumnName, encodeColumnType, encodeCreateTable, encodeGeometryColumn, encodeGeometryColumn, encodeGeometryColumn, encodeGeometryColumnGeneralized, encodeGeometryColumnGeneralized, encodeGeometryColumnSimplified, encodeGeometryColumnSimplified, encodeJoin, encodeNextSequenceValue, encodePostColumnCreateTable, encodePostCreateTable, encodePostSelect, encodePrimaryKey, encodeSchemaName, encodeTableAlias, encodeTableName, getDefaultVarcharSize, getDesiredTablesType, getGeometryDimension, getGeometrySRID, getGeometryTypeName, getIndexes, getLastAutoGeneratedValue, getLastAutoGeneratedValue, getMapping, getNameEscape, getNextAutoGeneratedValue, getNextSequenceValue, getOptimizedBounds, getPkColumnValue, getPrimaryKey, getSequenceForColumn, handleSelectHints, handleUserDefinedType, includeTable, isAggregatedSortSupported, isAutoCommitQuery, isGroupBySupported, isLimitOffsetSupported, lookupGeneratedValuesPostInsert, ne, postCreateAttribute, postCreateFeatureType, postCreateTable, postDropTable, preDropTable, registerAggregateFunctions, registerClassToSqlMappings, registerFunctions, registerSqlTypeNameToClassMappings, registerSqlTypeToClassMappings, registerSqlTypeToSqlTypeNameOverrides, splitFilter, supportsSchemaForIndex
protected MBTilesDialect(JDBCDataStore dataStore)
public void initializeConnection(Connection cx) throws SQLException
SQLDialect
Subclasses should override this method if there is some additional action that needs to be taken when a new connection to the database is created. The default implementation does nothing.
initializeConnection
in class SQLDialect
cx
- The new database connection.SQLException
public void encodeGeometryEnvelope(String tableName, String geometryColumn, StringBuffer sql)
SQLDialect
This method must also be sure to properly encode the name of the column with the SQLDialect.encodeColumnName(String, StringBuffer)
function.
encodeGeometryEnvelope
in class SQLDialect
public Envelope decodeGeometryEnvelope(ResultSet rs, int column, Connection cx) throws SQLException, IOException
SQLDialect
This method is given direct access to a result set. The column parameter is the
index into the result set which contains the spatial extent value. The query for this value
is build with the SQLDialect.encodeGeometryEnvelope(String, String, StringBuffer)
method.
This method must not read any other objects from the result set other then the one referenced by column.
decodeGeometryEnvelope
in class SQLDialect
rs
- A result setcolumn
- Index into the result set which points at the spatial extent value.SQLException
IOException
public Geometry decodeGeometryValue(GeometryDescriptor descriptor, ResultSet rs, String column, GeometryFactory factory, Connection cx, Hints hints) throws IOException, SQLException
SQLDialect
This method is given direct access to a result set. The column parameter is the index into the result set which contains the geometric value.
An implementation should deserialize the value provided by the result set into Geometry
object. For example, consider an implementation which deserializes from well known
text:
Note that implementations must handle
String wkt = rs.getString( column );
if ( wkt == null ) {
return null;
}
return new WKTReader(factory).read( wkt );
null
values.
The factory parameter should be used to instantiate any geometry objects.
decodeGeometryValue
in class SQLDialect
IOException
SQLException
Copyright © 1996–2019 Geotools. All rights reserved.