Class: QgsCachedFeatureIterator

Delivers features from the cache

Class Hierarchy

Inheritance diagram of qgis.core.QgsCachedFeatureIterator

Base classes

QgsAbstractFeatureIterator

Internal feature iterator to be implemented within data providers

Methods

close

Close this iterator.

fetchFeature

Implementation for fetching a feature.

nextFeatureFilterFids

We have a local special iterator for FilterFids, no need to run the generic.

rewind

Rewind to the beginning of the iterator

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:
close(self) bool[source]

Close this iterator. No further features will be available.

Return type:

bool

Returns:

True if successful

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

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

rewind(self) bool[source]

Rewind to the beginning of the iterator

Return type:

bool

Returns:

bool True if the operation was OK