Class: QgsCachedFeatureWriterIterator

class qgis.core.QgsCachedFeatureWriterIterator

Bases: QgsAbstractFeatureIterator

Uses another iterator as backend and writes features to the cache

QgsCachedFeatureWriterIterator(vlCache: QgsVectorLayerCache, featureRequest: QgsFeatureRequest) This constructor creates a feature iterator, which queries the backend and caches retrieved features.

Parameters
  • vlCache – The vector layer cache to use

  • featureRequest – The feature request to answer

QgsCachedFeatureWriterIterator(QgsCachedFeatureWriterIterator)

Methods

close

Close this iterator.

fetchFeature

Implementation for fetching a feature.

rewind

Rewind to the beginning of the iterator

close(self) bool

Close this iterator. No further features will be available.

Return type

bool

Returns

True if successful

fetchFeature(self, f: QgsFeature) bool

Implementation for fetching a feature.

Parameters

f (QgsFeature) – Will write to this feature

Return type

bool

Returns

bool True if the operation was OK

See also

bool()

rewind(self) bool

Rewind to the beginning of the iterator

Return type

bool

Returns

bool True if the operation was OK