Package org.geotools.data.duckdb
Class DuckDBFilterToSQL
- Object
-
- FilterToSQL
-
- DuckDBFilterToSQL
-
- All Implemented Interfaces:
ExpressionVisitor
,FilterVisitor
- Direct Known Subclasses:
GeoParquetFilterToSQL
public class DuckDBFilterToSQL extends FilterToSQL
Base FilterToSQL class for DuckDB with spatial support. Handles conversion of GeoTools filters to DuckDB SQL spatial functions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class FilterToSQL
FilterToSQL.FieldEncoder
-
-
Field Summary
-
Fields inherited from class FilterToSQL
capabilities, currentDimension, currentGeometry, currentSRID, databaseSchema, encodingFunction, escapeBackslash, featureType, fieldEncoder, filterFactory, inEncodingEnabled, inline, IO_ERROR, LOGGER, out, primaryKey, sqlNameEscape
-
-
Constructor Summary
Constructors Constructor Description DuckDBFilterToSQL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FilterCapabilities
createFilterCapabilities()
Sets the capabilities of this filter.protected Object
visitBBOX(BBOX filter, Expression leftExp, Expression rightExpt, Object extraData)
protected Object
visitBinarySpatialOperator(BinarySpatialOperator filter, Expression leftExp, Expression rightExpt, Object extraData)
Handles the more general case of two generic expressions.protected Object
visitBinarySpatialOperator(BinarySpatialOperator filter, PropertyName property, Literal geometry, boolean swapped, Object extraData)
Handles the common case of a PropertyName,Literal geometry binary spatial operator.protected Object
visitDistanceBufferOperator(DistanceBufferOperator filter, Expression leftExp, Expression rightExpt, Object extraData)
protected void
visitLiteralBoundingBox(BoundingBox bounds)
protected void
visitLiteralGeometry(Literal expression)
Subclasses must implement this method in order to encode geometry filters according to the specific database implementationprotected void
visitLiteralGeometry(Geometry g)
protected void
write(String fmt, Object... args)
-
Methods inherited from class FilterToSQL
cast, encode, encode, encodeBinaryComparisonOperator, encodeToString, encodeToString, escapeLiteral, escapeName, evaluateLiteral, getCapabilities, getDatabaseSchema, getDistanceInNativeUnits, getExpressionType, getFeatureType, getFunctionName, getFunctionReturnType, getParameter, getPrimaryKey, getSqlNameEscape, isBinaryExpression, isEscapeBackslash, isInEncodingEnabled, setCapabilities, setDatabaseSchema, setEscapeBackslash, setFeatureType, setFieldEncoder, setInEncodingEnabled, setInline, setPrimaryKey, setSqlNameEscape, setWriter, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitBinaryComparisonOperator, visitBinarySpatialOperator, visitBinaryTemporalOperator, visitBinaryTemporalOperator, visitBinaryTemporalOperator, visitInFunction, visitLiteralTimePeriod, visitNullFilter, writeBinaryExpression, writeBinaryExpressionMember, writeLiteral
-
-
-
-
Method Detail
-
createFilterCapabilities
protected FilterCapabilities createFilterCapabilities()
Description copied from class:FilterToSQL
Sets the capabilities of this filter.- Overrides:
createFilterCapabilities
in classFilterToSQL
- Returns:
- FilterCapabilities for this Filter
-
visitLiteralGeometry
protected void visitLiteralGeometry(Literal expression) throws IOException
Description copied from class:FilterToSQL
Subclasses must implement this method in order to encode geometry filters according to the specific database implementation- Overrides:
visitLiteralGeometry
in classFilterToSQL
- Throws:
IOException
-
visitLiteralGeometry
protected void visitLiteralGeometry(Geometry g) throws IOException
- Throws:
IOException
-
visitLiteralBoundingBox
protected void visitLiteralBoundingBox(BoundingBox bounds) throws IOException
- Throws:
IOException
-
visitBinarySpatialOperator
protected Object visitBinarySpatialOperator(BinarySpatialOperator filter, PropertyName property, Literal geometry, boolean swapped, Object extraData)
Description copied from class:FilterToSQL
Handles the common case of a PropertyName,Literal geometry binary spatial operator.- Overrides:
visitBinarySpatialOperator
in classFilterToSQL
-
visitBinarySpatialOperator
protected Object visitBinarySpatialOperator(BinarySpatialOperator filter, Expression leftExp, Expression rightExpt, Object extraData)
Description copied from class:FilterToSQL
Handles the more general case of two generic expressions.The most common case is two PropertyName expressions, which happens during a spatial join.
- Overrides:
visitBinarySpatialOperator
in classFilterToSQL
-
visitBBOX
protected Object visitBBOX(BBOX filter, Expression leftExp, Expression rightExpt, Object extraData)
-
visitDistanceBufferOperator
protected Object visitDistanceBufferOperator(DistanceBufferOperator filter, Expression leftExp, Expression rightExpt, Object extraData)
-
-