Class: QgsCachedFeatureIterator¶
Delivers features from the cache.
Class Hierarchy¶
Base classes¶
Internal feature iterator to be implemented within data providers. |
Abstract Methods
Close this iterator. |
|
Implementation for fetching a feature. |
|
Rewind to the beginning of the iterator |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsCachedFeatureIterator. See the FAQ for more details.
We have a local special iterator for FilterFids, no need to run the generic. |
- class qgis.core.QgsCachedFeatureIterator[source]¶
Bases:
QgsAbstractFeatureIterator
- __init__(vlCache: QgsVectorLayerCache | None, featureRequest: QgsFeatureRequest)
This constructor creates a feature iterator, that delivers all cached features. No request is made to the backend.
- Parameters:
vlCache (Optional[QgsVectorLayerCache]) – The vector layer cache to use
featureRequest (QgsFeatureRequest) – The feature request to answer
- abstract close(self) bool [source]¶
Close this iterator. No further features will be available.
- Return type:
bool
- Returns:
True
if successful
- abstract fetchFeature(self, f: QgsFeature) bool [source]¶
Implementation for fetching a feature.
- Parameters:
f (QgsFeature) – Will write to this feature
- Return type:
bool
- Returns:
bool
True
if the operation was OK
- virtual nextFeatureFilterFids(self, f: QgsFeature) bool [source]¶
We have a local special iterator for FilterFids, no need to run the generic.
- Parameters:
f (QgsFeature) – Will write to this feature
- Return type:
bool
- Returns:
bool
True
if the operation was OK