33 QMutexLocker locker( &layer->mFeatureSourceConstructorMutex );
56 if ( L->editBuffer()->addedFeatures().contains( request.filterFid() ) )
57 mAddedFeatures.insert( request.filterFid(), L->editBuffer()->addedFeatures()[ request.filterFid()] );
59 if ( L->editBuffer()->changedGeometries().contains( request.filterFid() ) )
60 mChangedGeometries.insert( request.filterFid(), L->editBuffer()->changedGeometries()[ request.filterFid()] );
62 if ( L->editBuffer()->deletedFeatureIds().contains( request.filterFid() ) )
65 if ( L->editBuffer()->changedAttributeValues().contains( request.filterFid() ) )
66 mChangedAttributeValues.insert( request.filterFid(), L->editBuffer()->changedAttributeValues()[ request.filterFid()] );
68 if ( L->editBuffer()->changedAttributeValues().contains( request.filterFid() ) )
69 mChangedFeaturesRequest.setFilterFids(
QgsFeatureIds() << request.filterFid() );
120 , mFetchedFid( false )
174 QSet<int> providerSubset;
177 for (
int attrIndex : subset )
179 if ( attrIndex < 0 || attrIndex >= nPendingFields )
193 for (
int attrIndex : usedAttributeIndices )
195 providerSubset << attrIndex;
206 for (
const QString &field : constReferencedColumns )
234 changedIds << attIt.key();
296 class QgsThreadStackOverflowGuard
300 QgsThreadStackOverflowGuard( QThreadStorage<QStack<QString>> &storage,
const QString &stackFrameInformation,
int maxDepth )
301 : mStorage( storage )
302 , mMaxDepth( maxDepth )
304 if ( !storage.hasLocalData() )
306 storage.setLocalData( QStack<QString>() );
309 storage.localData().push( stackFrameInformation );
312 ~QgsThreadStackOverflowGuard()
314 mStorage.localData().pop();
317 bool hasStackOverflow()
const 319 if ( mStorage.localData().size() > mMaxDepth )
325 QString topFrames()
const 327 QStringList dumpStack;
328 const QStack<QString> &stack = mStorage.localData();
330 int dumpSize = std::min( stack.size(), 10 );
331 for (
int i = 0; i < dumpSize; ++i )
333 dumpStack += stack.at( i );
336 return dumpStack.join(
'\n' );
341 return mStorage.localData().size();
345 QThreadStorage<QStack<QString>> &mStorage;
358 static QThreadStorage<QStack<QString>> sStack;
360 QgsThreadStackOverflowGuard guard( sStack,
mSource->
id(), 4 );
362 if ( guard.hasStackOverflow() )
373 if ( res && postProcessFeature( f ) )
447 if ( !postProcessFeature( f ) )
494 mInterruptionChecker = interruptionChecker;
520 if ( !postProcessFeature( f ) )
574 if ( postProcessFeature( f ) )
665 int sourceLayerIndex;
667 Q_ASSERT( joinInfo );
693 mFetchJoinInfo[ joinInfo ].attributes.push_back( sourceLayerIndex );
699 static QThreadStorage<QStack<QString>> sStack;
701 QgsThreadStackOverflowGuard guard( sStack,
mSource->
id(), 4 );
703 if ( guard.hasStackOverflow() )
712 std::unique_ptr<QgsExpression> exp = qgis::make_unique<QgsExpression>( exps[oi].cachedExpression );
717 exp->setGeomCalculator( &da );
721 if ( !mExpressionContext )
722 createExpressionContext();
723 exp->prepare( mExpressionContext.get() );
724 const QSet<int> referencedColumns = exp->referencedAttributeIndexes(
mSource->
fields() );
728 for (
int dependentFieldIdx : referencedColumns )
732 requestedAttributes += dependentFieldIdx;
735 if ( !mPreparedFields.contains( dependentFieldIdx ) && !mFieldsToPrepare.contains( dependentFieldIdx ) )
736 mFieldsToPrepare << dependentFieldIdx;
744 if ( exp->needsGeometry() )
754 mPreparedFields.clear();
755 mFieldsToPrepare.clear();
757 mOrderedJoinInfoList.clear();
759 mExpressionContext.reset();
763 while ( !mFieldsToPrepare.isEmpty() )
765 int fieldIdx = mFieldsToPrepare.takeFirst();
766 if ( mPreparedFields.contains( fieldIdx ) )
769 mPreparedFields << fieldIdx;
776 createOrderedJoinList();
780 void QgsVectorLayerFeatureIterator::createOrderedJoinList()
783 if ( mOrderedJoinInfoList.size() < 2 )
788 QSet<int> resolvedFields;
791 QList< int >::const_iterator prepFieldIt = mPreparedFields.constBegin();
792 for ( ; prepFieldIt != mPreparedFields.constEnd(); ++prepFieldIt )
796 resolvedFields.insert( *prepFieldIt );
803 int maxIterations = ( mOrderedJoinInfoList.size() + 1 ) * mOrderedJoinInfoList.size() / 2.0;
804 int currentIteration = 0;
806 for (
int i = 0; i < mOrderedJoinInfoList.size() - 1; ++i )
808 if ( !resolvedFields.contains( mOrderedJoinInfoList.at( i ).targetField ) )
810 mOrderedJoinInfoList.append( mOrderedJoinInfoList.at( i ) );
811 mOrderedJoinInfoList.removeAt( i );
816 int offset = mOrderedJoinInfoList.at( i ).indexOffset;
817 int joinField = mOrderedJoinInfoList.at( i ).joinField;
820 for (
int n = 0; n < attributes.size(); n++ )
822 if ( n != joinField )
824 resolvedFields.insert( joinField < n ? n + offset - 1 : n + offset );
830 if ( currentIteration >= maxIterations )
837 bool QgsVectorLayerFeatureIterator::postProcessFeature(
QgsFeature &feature )
839 bool result = checkGeometryValidity( feature );
845 bool QgsVectorLayerFeatureIterator::checkGeometryValidity(
const QgsFeature &feature )
910 QList< FetchJoinInfo >::const_iterator joinIt = mOrderedJoinInfoList.constBegin();
911 for ( ; joinIt != mOrderedJoinInfoList.constEnd(); ++joinIt )
913 QVariant targetFieldValue = f.
attribute( joinIt->targetField );
914 if ( !targetFieldValue.isValid() )
917 const QHash< QString, QgsAttributes> &memoryCache = joinIt->joinInfo->cachedAttributes;
918 if ( memoryCache.isEmpty() )
919 joinIt->addJoinedAttributesDirect( f, targetFieldValue );
921 joinIt->addJoinedAttributesCached( f, targetFieldValue );
935 QList< int > fetchedVirtualAttributes;
937 QMap<const QgsVectorLayerJoinInfo *, FetchJoinInfo>::const_iterator joinIt =
mFetchJoinInfo.constBegin();
944 fetchedVirtualAttributes << joinIt->targetField;
957 if ( fetchedVirtualAttributes.contains( it.key() ) )
970 if ( !mExpressionContext )
971 createExpressionContext();
973 mExpressionContext->setFeature( f );
974 QVariant val = exp->
evaluate( mExpressionContext.get() );
986 Q_UNUSED( simplifyMethod )
992 Q_UNUSED( methodType )
999 const QHash<QString, QgsAttributes> &memoryCache = joinInfo->cachedAttributes;
1000 QHash<QString, QgsAttributes>::const_iterator it = memoryCache.find( joinValue.toString() );
1001 if ( it == memoryCache.constEnd() )
1004 int index = indexOffset;
1007 for (
int i = 0; i < featureAttributes.count(); ++i )
1018 QString subsetString;
1020 QString joinFieldName = joinInfo->joinFieldName();
1022 subsetString.append( QStringLiteral(
"\"%1\"" ).arg( joinFieldName ) );
1024 if ( joinValue.isNull() )
1026 subsetString += QLatin1String(
" IS NULL" );
1030 QString v = joinValue.toString();
1031 switch ( joinValue.type() )
1034 case QVariant::LongLong:
1035 case QVariant::Double:
1039 case QVariant::String:
1040 v.replace(
'\'', QLatin1String(
"''" ) );
1041 v.prepend(
'\'' ).append(
'\'' );
1044 subsetString +=
'=' + v;
1049 QVector<int> subsetIndices;
1050 if ( joinInfo->hasSubset() )
1068 int index = indexOffset;
1070 if ( joinInfo->hasSubset() )
1072 for (
int i = 0; i < subsetIndices.count(); ++i )
1073 f.
setAttribute( index++, attr.at( subsetIndices.at( i ) ) );
1078 for (
int i = 0; i < attr.count(); ++i )
1080 if ( i == joinField )
1114 if ( iter->id() == featureId )
1156 for ( QgsAttributeMap::const_iterator it = map.begin(); it != map.end(); ++it )
1157 attrs[it.key()] = it.value();
1168 void QgsVectorLayerFeatureIterator::createExpressionContext()
1170 mExpressionContext = qgis::make_unique< QgsExpressionContext >();
1176 bool QgsVectorLayerFeatureIterator::prepareOrderBy(
const QList<QgsFeatureRequest::OrderByClause> &orderBys )
1178 Q_UNUSED( orderBys )
1189 , mSelectedFeatureIds( layer->selectedFeatureIds() )
1190 , mWkbType( layer->wkbType() )
1191 , mName( layer->name() )
1216 return QgsFeatureIterator(
new QgsVectorLayerSelectedFeatureIterator( mSelectedFeatureIds, req, mSource ) );
1221 return mSource.
crs();
1236 return mSelectedFeatureIds.count();
1247 return mLayer->createExpressionContextScope();
1259 , mSelectedFeatureIds( selectedFeatureIds )
1272 bool QgsVectorLayerSelectedFeatureIterator::rewind()
1274 return mIterator.
rewind();
1277 bool QgsVectorLayerSelectedFeatureIterator::close()
1279 return mIterator.close();
1282 bool QgsVectorLayerSelectedFeatureIterator::fetchFeature(
QgsFeature &f )
1284 while ( mIterator.nextFeature( f ) )
1286 if ( mSelectedFeatureIds.contains( f.
id() ) )
int lookupField(const QString &fieldName) const
Looks up field's index from the field name.
QList< QgsExpressionFieldBuffer::ExpressionField > expressions() const
QgsAbstractFeatureSource * mProviderFeatureSource
Class for parsing and evaluation of expressions (formerly called "search strings").
QgsFeatureRequest & setDestinationCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets the destination crs for feature's geometries.
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const override
Returns an iterator for the features in the source.
void addJoinedAttributesDirect(QgsFeature &f, const QVariant &joinValue) const
Wrapper for iterator of features from vector data provider or vector layer.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
const QgsVectorLayerJoinInfo * joinInfo
Canonical source of information about the join.
QString targetFieldName() const
Returns name of the field of our layer that will be used for join.
long limit() const
Returns the maximum number of features to request, or -1 if no limit set.
bool acceptFeature(const QgsFeature &feature)
Check if a feature is accepted by this requests filter.
void geometryToDestinationCrs(QgsFeature &feature, const QgsCoordinateTransform &transform) const
Transforms feature's geometry according to the specified coordinate transform.
QgsCoordinateReferenceSystem sourceCrs() const override
Returns the coordinate reference system for features in the source.
bool fetchNextAddedFeature(QgsFeature &f)
QgsVectorLayerJoinBuffer * mJoinBuffer
QgsCoordinateReferenceSystem crs() const
Returns the coordinate reference system for features retrieved from this source.
bool containsJoins() const
Quick way to test if there is any join at all.
Field comes from a joined layer (originIndex / 1000 = index of the join, originIndex % 1000 = index w...
QSet< QgsFeatureId > QgsFeatureIds
FieldOrigin fieldOrigin(int fieldIdx) const
Gets field's origin (value from an enumeration)
bool fetchNextChangedGeomFeature(QgsFeature &f)
void setInterruptionChecker(QgsFeedback *interruptionChecker) override
Attach an object that can be queried regularly by the iterator to check if it must stopped...
void setFields(const QgsFields &fields, bool initAttributes=false)
Assign a field map with the feature to allow attribute access by attribute name.
QString sourceName() const override
Returns a friendly display name for the source.
const Flags & flags() const
void createJoinCaches()
Calls cacheJoinLayer() for all vector joins.
QgsFeatureIterator mProviderIterator
QMap< int, QgsExpression * > mExpressionFieldInfo
void addJoinedAttributes(QgsFeature &f)
void addExpressionAttribute(QgsFeature &f, int attrIndex)
Adds an expression based attribute to a feature.
QgsFeatureMap::ConstIterator mFetchAddedFeaturesIt
QgsGeometryMap::ConstIterator mFetchChangedGeomIt
QgsRectangle filterRectToSourceCrs(const QgsCoordinateTransform &transform) const SIP_THROW(QgsCsException)
Returns a rectangle representing the original request's QgsFeatureRequest::filterRect().
Field has been temporarily added in editing mode (originIndex = index in the list of added attributes...
bool exists(int i) const
Returns if a field index is valid.
void setFeature(const QgsFeature &feature)
Convenience function for setting a feature for the context.
QgsVectorLayerFeatureIterator(QgsVectorLayerFeatureSource *source, bool ownSource, const QgsFeatureRequest &request)
QgsVectorLayerSelectedFeatureSource(QgsVectorLayer *layer)
Constructor for QgsVectorLayerSelectedFeatureSource, for selected features from the specified layer...
QgsExpressionContext * expressionContext()
Returns the expression context used to evaluate filter expressions.
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) override
Gets an iterator for features matching the specified request.
QgsFeatureId filterFid() const
Gets the feature ID that should be fetched.
QVariant evaluate()
Evaluate the feature and return the result.
QgsCoordinateReferenceSystem destinationCrs() const
Returns the destination coordinate reference system for feature's geometries, or an invalid QgsCoordi...
QgsFeatureRequest & setSubsetOfAttributes(const QgsAttributeList &attrs)
Set a subset of attributes that will be fetched.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest())=0
Gets an iterator for features matching the specified request.
bool convertCompatible(QVariant &v) const
Converts the provided variant to a compatible format.
FilterType filterType() const
Returns the filter type which is currently set on this request.
Container of fields for a vector layer.
const QgsFeatureIds & filterFids() const
Gets feature IDs that should be fetched.
QSet< int > referencedAttributeIndexes(const QgsFields &fields) const
Returns a list of field name indexes obtained from the provided fields.
A geometry is the spatial representation of a feature.
void setAttributes(const QgsAttributes &attrs)
Sets the feature's attributes.
bool setAttribute(int field, const QVariant &attr)
Set an attribute's value by field index.
Skip any features with invalid geometry. This requires a slow geometry validity check for every featu...
bool needsGeometry() const
Returns true if the expression uses feature geometry for some computation.
QList< QgsField > mAddedAttributes
Field comes from the underlying data provider of the vector layer (originIndex = index in provider's ...
bool mClosed
Sets to true, as soon as the iterator is closed.
static QgsExpressionContextScope * projectScope(const QgsProject *project)
Creates a new scope which contains variables and functions relating to a QGIS project.
QSet< QString > referencedColumns() const
Gets list of columns referenced by the expression.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsChangedAttributesMap changedAttributeValues() const
Returns a map of features with changed attributes values which are not committed. ...
const QgsAttributeList & attributeIndexes
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QgsVectorLayer * joinLayer
Resolved pointer to the joined layer.
const QgsRectangle & filterRect() const
Returns the rectangle from which features will be taken.
int count() const
Returns number of items.
QgsFeatureIds deletedFeatureIds() const
Returns a list of deleted feature IDs which are not committed.
It has not been specified where the field comes from.
QgsFields fields() const override
Returns the fields associated with features in the source.
QgsField at(int i) const
Gets field at particular index (must be in range 0..N-1)
int joinField
Index of field (of the joined layer) must have equal value.
QgsFeatureRequest mChangedFeaturesRequest
QgsExpression * filterExpression() const
Returns the filter expression if set.
int fieldOriginIndex(int fieldIdx) const
Gets field's origin index (its meaning is specific to each type of origin)
virtual QgsAbstractFeatureSource * featureSource() const =0
Returns feature source object that can be used for querying provider's data.
Base class for feedback objects to be used for cancellation of something running in a worker thread...
void updateChangedAttributes(QgsFeature &f)
Update feature with uncommitted attribute updates.
QgsExpressionContextScope mLayerScope
QgsFeatureRequest & setFilterFid(QgsFeatureId fid)
Sets feature ID that should be fetched.
QgsVectorLayerEditBuffer * editBuffer()
Buffer with uncommitted editing operations. Only valid after editing has been turned on...
QgsGeometryMap changedGeometries() const
Returns a map of features with changed geometries which are not committed.
QgsFeatureRequest & setFilterExpression(const QString &expression)
Set the filter expression.
~QgsVectorLayerFeatureIterator() override
Type
The WKB type describes the number of dimensions a geometry has.
bool fetchNextChangedAttributeFeature(QgsFeature &f)
void iteratorClosed()
to be called by from subclass in close()
int indexFromName(const QString &fieldName) const
Gets the field index from the field name.
QgsVectorLayerFeatureSource * mSource
void useAddedFeature(const QgsFeature &src, QgsFeature &f)
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context...
QString id() const
Returns the layer's unique ID, which is used to access this layer from QgsProject.
bool isGeosValid(QgsGeometry::ValidityFlags flags=nullptr) const
Checks validity of the geometry using GEOS.
QgsFields fields() const FINAL
Returns the list of fields of this layer.
QgsVectorLayer * joinLayer() const
Returns joined layer (may be nullptr if the reference was set by layer ID and not resolved yet) ...
QgsAttributeList allAttributesList() const
Utility function to get list of attribute indexes.
QgsFields fields() const
Returns the fields that will be available for features that are retrieved from this source...
QgsFeatureRequest & disableFilter()
Disables filter conditions.
Internal feature iterator to be implemented within data providers.
void updateFeatureGeometry(QgsFeature &f)
Update feature with uncommitted geometry updates.
bool prepareSimplification(const QgsSimplifyMethod &simplifyMethod) override
Setup the simplification of geometries to fetch using the specified simplify method.
friend class QgsVectorLayerFeatureIterator
void addJoinedAttributesCached(QgsFeature &f, const QVariant &joinValue) const
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Defines left outer join from our vector layer to some other vector layer.
void setInterruptionChecker(QgsFeedback *interruptionChecker)
Attach an object that can be queried regularly by the iterator to check if it must stopped...
QMap< int, QVariant > QgsAttributeMap
QgsAttributeList deletedAttributeIds() const
Returns a list of deleted attributes fields which are not committed.
QgsExpressionContextScope * createExpressionContextScope() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QgsFeatureRequest mProviderRequest
QgsFeatureRequest & setFilterRect(const QgsRectangle &rectangle)
Sets the rectangle from which features will be taken.
void prepareExpression(int fieldIdx)
bool fetchFeature(QgsFeature &feature) override
fetch next feature, return true on success
QgsGeometryMap mChangedGeometries
QgsWkbTypes::Type wkbType() const override
Returns the geometry type for features returned by this source.
QgsFeatureIds mDeletedFeatureIds
QgsAttributeList mDeletedAttributeIds
No invalid geometry checking.
Fetch only a subset of attributes (setSubsetOfAttributes sets this flag)
void setId(QgsFeatureId id)
Sets the feature ID for this feature.
Single scope for storing variables and functions for use within a QgsExpressionContext.
QgsExpressionFieldBuffer * mExpressionFieldBuffer
void prepareField(int fieldIdx)
void setFields(const QgsFields &fields)
Convenience function for setting a fields for the context.
QSet< QgsFeatureId > mFetchConsidered
QgsAttributeList subsetOfAttributes() const
Returns the subset of attributes which at least need to be fetched.
Partial snapshot of vector layer's state (only the members necessary for access to features) ...
bool nextFeatureFid(QgsFeature &f)
int indexOffset
At what position the joined fields start.
QgsCoordinateTransformContext transformContext
void useChangedAttributeFeature(QgsFeatureId fid, const QgsGeometry &geom, QgsFeature &f)
A general purpose distance and area calculator, capable of performing ellipsoid based calculations...
void setValid(bool validity)
Sets the validity of the feature.
~QgsVectorLayerFeatureSource() override
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
long featureCount() const override
Returns the number of features contained in the source, or -1 if the feature count is unknown...
QgsFeatureMap addedFeatures() const
Returns a map of new features which are not committed.
QgsFeatureRequest mRequest
A copy of the feature request.
int targetField
Index of field (of this layer) that drives the join.
Buffers information about expression fields for a vector layer.
QgsFeatureRequest & setFilterFids(const QgsFeatureIds &fids)
Sets feature IDs that should be fetched.
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
QgsFeatureMap mAddedFeatures
bool prepare(const QgsExpressionContext *context)
Gets the expression ready for evaluation - find out column indexes.
bool rewind() override
reset the iterator to the starting position
static QgsProject * instance()
Returns the QgsProject singleton instance.
QMap< const QgsVectorLayerJoinInfo *, QgsVectorLayerFeatureIterator::FetchJoinInfo > mFetchJoinInfo
Information about joins used in the current select() statement.
This class represents a coordinate reference system (CRS).
bool close() override
end of iterating: free the resources / lock
static QVector< int > joinSubsetIndices(QgsVectorLayer *joinLayer, const QStringList &joinFieldsSubset)
Returns a vector of indices for use in join based on field names from the layer.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
InvalidGeometryCheck invalidGeometryCheck() const
Returns the invalid geometry checking behavior.
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
const QgsVectorLayerJoinInfo * joinForFieldIndex(int index, const QgsFields &fields, int &sourceFieldIndex) const
Finds the vector join for a layer field index.
QgsFeatureRequest & setLimit(long limit)
Set the maximum number of features to request.
Join information prepared for fast attribute id mapping in QgsVectorLayerJoinBuffer::updateFeatureAtt...
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
QgsCoordinateReferenceSystem mCrs
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.
Custom exception class for Coordinate Reference System related exceptions.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
QList< int > QgsAttributeList
QString id() const
Returns the layer id of the source layer.
static QgsExpressionContextScope * layerScope(const QgsMapLayer *layer)
Creates a new scope which contains variables and functions relating to a QgsMapLayer.
bool nextFeature(QgsFeature &f)
bool mHasVirtualAttributes
QgsChangedAttributesMap mChangedAttributeValues
OrderBy orderBy() const
Returns a list of order by clauses specified for this feature request.
Geometry is not required. It may still be returned if e.g. required for a filter condition.
void prepareJoin(int fieldIdx)
QList< QgsField > addedAttributes() const
Returns a list of added attributes fields which are not committed.
Represents a vector layer which manages a vector based data sets.
bool isValid() const override
Returns if this iterator is valid.
QVariant attribute(const QString &name) const
Lookup attribute value from attribute name.
Field is calculated from an expression.
QString joinFieldName() const
Returns name of the field of joined layer that will be used for join.
QgsCoordinateTransform mTransform
QgsCoordinateTransformContext transformContext() const
Returns the transform context, for use when a destinationCrs() has been set and reprojection is requi...
virtual bool isValid() const
Will return if this iterator is valid.
bool isClosed() const
find out whether the iterator is still valid or closed already
QgsVectorLayerFeatureSource(const QgsVectorLayer *layer)
Constructor for QgsVectorLayerFeatureSource.
QStringList * joinFieldNamesSubset() const
Returns the subset of fields to be used from joined layer.
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
std::function< void(const QgsFeature &) > invalidGeometryCallback() const
Returns the callback function to use when encountering an invalid geometry and invalidGeometryCheck()...
QgsCoordinateReferenceSystem crs
int joinedFieldsOffset(const QgsVectorLayerJoinInfo *info, const QgsFields &fields)
Find out what is the first index of the join within fields.
QgsVectorLayerJoinBuffer * clone() const
Create a copy of the join buffer.
void addVirtualAttributes(QgsFeature &f)
Adds attributes that don't source from the provider but are added inside QGIS Includes.
QgsFeatureRequest & setFlags(QgsFeatureRequest::Flags flags)
Sets flags that affect how features will be fetched.
QgsFeatureIterator mChangedFeaturesIterator
Helper template that cares of two things: 1.
QSet< int > CORE_EXPORT usedAttributeIndices(const QgsFields &fields) const
Returns a set of used, validated attribute indices.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.