31 #ifndef OGR_GENSQL_H_INCLUDED
32 #define OGR_GENSQL_H_INCLUDED
38 #define GEOM_FIELD_INDEX_TO_ALL_FIELD_INDEX(poFDefn, iGeom) \
39 ((poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT + (iGeom))
41 #define IS_GEOM_FIELD_INDEX(poFDefn, idx) \
42 (((idx) >= (poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT) && \
43 ((idx) < (poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT + (poFDefn)->GetGeomFieldCount()))
45 #define ALL_FIELD_INDEX_TO_GEOM_FIELD_INDEX(poFDefn, idx) \
46 ((idx) - ((poFDefn)->GetFieldCount() + SPECIAL_FIELD_COUNT))
65 int *panGeomFieldToSrcGeomField;
71 GIntBig nNextIndexFID;
82 void CreateOrderByIndex();
83 int SortIndexSection(
OGRField *pasIndexFields,
84 GIntBig nStart, GIntBig nEntries );
88 void ApplyFiltersToSource();
90 void FindAndSetIgnoredFields();
91 void ExploreExprForIgnoredFields(
swq_expr_node* expr, CPLHashSet* hSet);
92 void AddFieldDefnToSet(
int iTable,
int iColumn, CPLHashSet* hSet);
96 void InvalidateOrderByIndex();
98 int MustEvaluateSpatialFilterOnGenSQL();
104 const char *pszWHERE,
105 const char *pszDialect );
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:340
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1106
virtual OGRErr SetNextByIndex(GIntBig nIndex)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:498
virtual OGRGeometry * GetSpatialFilter()
This method returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1079
Definition of a feature class or feature layer.
Definition: ogr_feature.h:206
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:446
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:171
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
Classes related to registration of format support, and opening datasets.
virtual int TestCapability(const char *)=0
Test if this layer supported the named capability.
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
Simple container for a bounding region.
Definition: ogr_core.h:48
OGRFeature field attribute value union.
Definition: ogr_core.h:662
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer.
Definition: ogr_gensql.h:118
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:66
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_WARN_UNUSED_RESULT
Fetch the extent of this layer.
Definition: ogrlayer.cpp:212
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:274
virtual OGRFeature * GetNextFeature() CPL_WARN_UNUSED_RESULT=0
Fetch the next available feature from this layer.
A set of associated raster bands, usually from one file.
Definition: gdal_priv.h:296
virtual void SetSpatialFilter(OGRGeometry *poGeom)
Set a new spatial filter.
Definition: ogr_gensql.h:123
Definition: ogr_gensql.h:52